Hints for title line breaks in Plone

天大地大妈咪最大 提交于 2019-12-11 03:38:32

问题


Does HTML support any kind of hinting for (title) line-breaks? The problem is that often page titles or navigational titles have funny line breaking, as they happen to break wherever the current HTML element spacing allows. Manual line-breaks would give much nicer visuals, when line-breaks are needed.

The line-break hints should be something the editor can himself/herself enter to an <input type=text> field.


回答1:


There's the &shy; (soft hyphen) entity and the <wbr> tag (HTML5) for word break marks. Notice that &shy; will create a hyphen if the line breaks, while <wbr> won't.

See also http://www.quirksmode.org/oddsandends/wbr.html.

So an editor could use &shy; for word breaking if he prefers a dash (-), or &#8203; if he prefers only a word break.



来源:https://stackoverflow.com/questions/9276606/hints-for-title-line-breaks-in-plone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!