【发布时间】:2020-07-28 06:13:24
【问题描述】:
我目前在我的标题元素中遇到换行问题。标题不应该换行到图像中,但我也不希望它在没有连字符的情况下换行。我不希望文案编辑自己用 html 断字。我想要一个用 css 构建的整体解决方案。
这些我已经试过了:
line-break: anywhere;
line-break: normal;
line-break: loose;
line-break: strict;
word-break: break-all;
word-wrap: break-word;
提前非常感谢您! :-)
【问题讨论】:
-
stackoverflow.com/questions/42685806/css-break-word-with-hyphen 这几乎总结了它。遗憾的是,自动连字在 Chrome 中不起作用
标签: html css line-breaks word-break