使用 CSS 在元素內部停用文字換行
若要停用元素內部的文字換行,請使用 white-space 屬性。您可以嘗試執行以下程式碼來實現 white-space 屬性
示例
<!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>
廣告
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP