溢出换行和字休息之间的区别? [英] Difference between overflow-wrap and word-break?

查看:112
本文介绍了溢出换行和字休息之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

overflow-wrap / word-wrap和word-break之间的确切区别是什么?
任何人都可以告诉我,打破非常长的链接最好的一个是什么?大多数人说你应该使用word-break结合溢出wrap,但它不看起来很合乎逻辑。我认为使用overflow-wrap结合word-wrap更好的跨浏览器支持是最好的方法。

What´s the exact difference between overflow-wrap/word-wrap and word-break? And can anybody tell me what´s the better one for breaking very long links? Most people say you should use word-break in combination with overflow-wrap but it doesn´t look very logical. I think using overflow-wrap in combination with word-wrap for better cross-browser support is the best method. What do you think?

推荐答案

引用来源


  • word-wrap:文字换行CSS属性用于指定浏览器是否可以在单词中打破行,以防止在其他不可破解的字符串太长而无法容纳在其包含框中时溢出。

  • word-wrap: The word-wrap CSS property is used to specify whether or not the browser may break lines within words in order to prevent overflow when an otherwise unbreakable string is too long to fit in its containing box.

overflow-wrap: word-wrap 属性已在当前草案中重命名为 overflow-wrap CSS3文本规范

overflow-wrap: word-wrap property has been renamed overflow-wrap in the current draft of the CSS3 Text specification

word-break:单词断开CSS属性用于指定如何(或如果)断开单词内的行

word-break: The word-break CSS property is used to specify how (or if) to break lines within words

因此,你需要将word-break与word-wrap相结合,这是正确的组合。

So, you need word-break in combination with word-wrap, which is the right combination.

这篇关于溢出换行和字休息之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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