使用CSS禁用元素内的文本换行
要禁用元素内的文本换行,请使用空白属性。您可以尝试运行以下代码来实现空白属性
示例
<!DOCTYPE html>
<html>
<head>
<style>
p {
white-space: nowrap;
}
</style>
</head>
<body>
<p>
This is demo text. This is demo text.
This is demo text. This is demo text.
This is demo text. This is demo text.
This is some text. This is demo text.
</p>
</body>
</html>热门推荐
10 分别祝福语简短情侣短句
11 喜事敬酒祝福语简短精辟
12 新婚祝福语大全简短精炼
13 爸爸爱你祝福语大全简短
14 校长退休文案祝福语简短
15 月子小孩祝福语大全简短
16 宝宝新生入学祝福语简短
17 早晨好正能量祝福语简短
18 团队文案祝福语简短励志