What's the opposite of a nbsp?

前端 未结 6 1866
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 09:21

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

lorem ipsum here are some words an

相关标签:
6条回答
  • 2020-12-04 09:52

    use <wbr>.

    0 讨论(0)
  • 2020-12-04 09:53

    You can use CSS3 property called word-wrap

    p.test {word-wrap:break-word;}
    

    Hope it helps!

    0 讨论(0)
  • 2020-12-04 09:55

    There's a nice page over at quirksmode.org that answers this question quite nicely IMHO. http://www.quirksmode.org/oddsandends/wbr.html

    In short: use <wbr /> or &#8203; (or &shy; but you mentioned you don't want the dash).

    0 讨论(0)
  • 2020-12-04 10:01

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

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

    Explicit breaks and non-breaks:

    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/

    0 讨论(0)
  • 2020-12-04 10:04

    theres a lot of discussion about this but it has become more or less standard to use &shy;

    0 讨论(0)
  • 2020-12-04 10:07

    There also is the little-known wbr tag, which lets the browser to decide whether to break the line or not.

    0 讨论(0)
提交回复
热议问题