CSS3 文本換行word-wrap
提問人:劉團(tuán)圓發(fā)布時間:2020-11-19
word-wrap屬性允許長單詞或URL地址換行到下一行。
【例題】使用word-wrap屬性
代碼如下:
<!DOCTYPE html>
<html>
<head>
<style>
p.test{
width:11em;
border:1px solid #000000;
word-wrap: break-word;
}
</style>
</head>
<body>
<p class="test">
This paragraph contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.
</p>
</body>
</html>
繼續(xù)查找其他問題的答案?
相關(guān)視頻回答
點擊加載更多評論>>