位置:首頁(yè) > 軟件操作教程 > 編程開發(fā) > CSS > 問(wèn)題詳情

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>

image.png


繼續(xù)查找其他問(wèn)題的答案?

相關(guān)視頻回答
回復(fù)(0)
返回頂部