a的相反是什么? [英] What's the opposite of a nbsp?

查看:124
本文介绍了a的相反是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

A & nbsp; 是一个不允许换行的空格。

A   character is a space which doesn't allow for line breaking.

<p>lorem ipsum here&nbsp;are&nbsp;some&nbsp;words and so on</p>

| lorem ipsum                |
| here are some words and so |
| on                         |

有什么相反的?也就是说,一个字符不会作为空格呈现,但可以用于换行。

What's the opposite of that? That is, a character which is NOT rendered as a space, but CAN be used for line breaking.

<p>foo supercalifragilisticexpialidocious bar</p>
<!--   put char here ^   and here ^ -->

|foo supercalifragi |
|listicexpiali      |
|docious bar        |

or with wider size:

|foo supercalifragilisticexpiali   |
|docious bar                       |

我知道软连字符,但为了我的目的,我具体做不是

I'm aware of the soft-hyphen character, but for my purposes, I specifically do not want a hyphen added at the break.

推荐答案

您需要unicode字符ZERO-WIDTH SPACE(\\\​)。

You want the unicode character ZERO-WIDTH SPACE (\u200B).

您可以使用&#8203; &#x200b; code>。

You can get it in HTML with &#8203; or &#x200b;.


显式休息和非休息:

Explicit breaks and non-breaks:

LB7:不要在空格或零宽度空格之前中断。

LB8:在零宽度空格之后的任何字符之前,即使一个或多个空格插入,也会分隔。

http://unicode.org/reports/tr14/

LB7 : Do not break before spaces or zero width space.
LB8 : Break before any character following a zero-width space, even if one or more spaces intervene.
http://unicode.org/reports/tr14/

这篇关于a的相反是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆