美文网首页
英文单词换行加连字符"-"

英文单词换行加连字符"-"

作者: SheldonYu | 来源:发表于2020-10-12 14:09 被阅读0次

    英文段落中, 单词过长, 在句尾会被折断, 如果像书本那样加上连字符"-"就美观了, CSS3提供了一个属性hyphens来实现该效果.

    DEMO
    核心代码如下:

    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    word-wrap: break-word;
    

    相关文章

      网友评论

          本文标题:英文单词换行加连字符"-"

          本文链接:https://www.haomeiwen.com/subject/cayupktx.html