word-break:break-all和word-wrap:break-word的区别实例页面

代码:

word-break:break-all和word-wrap:break-word的区别实例页面_第1张图片

CSS代码:

p {
    width: 300px;
    padding: 5px;
    background-color: #f0f3f9;
    font-size: 14px;
}
.word-break {
    word-break: break-all;
}
.word-wrap {
    word-wrap: break-word;
}

HTML代码:

word-break:break-all

你追我,如果你追到我,我就把你嘿嘿嘿,嘿嘿嘿就是打牌啦……的拼音是nizhuiwo, ruguonizhuidaowo, wojiubanniheiheihei, heiheiheijiushidapaila....标点去掉就是:nizhuiworuguonizhuidaowowojiubanniheiheiheiheiheiheijiushidapaila....

word-wrap: break-word;

你追我,如果你追到我,我就把你嘿嘿嘿……的拼音是nizhuiwo, ruguonizhuidaowo, wojiubanniheiheihei, heiheiheijiushidapaila....标点去掉就是:nizhuiworuguonizhuidaowowojiubanniheiheiheiheiheiheijiushidapaila....

你可能感兴趣的:(word-break:break-all和word-wrap:break-word的区别实例页面)