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>
已有 22658 名学员学习以下课程通过考试
最需教育客户端 软件问题一手掌握
去 App Store 免费下载 iOS 客户端
点击加载更多评论>>