CSS3 文本換行word-wrap
提問(wèn)人:劉團(tuán)圓發(fā)布時(shí)間:2020-11-19
word-wrap屬性允許長(zhǎng)單詞或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ù)查找其他問(wèn)題的答案?
相關(guān)視頻回答
點(diǎn)擊加載更多評(píng)論>>