word-break:【斷詞】
定義:規定自動換行的處理方法. 注意:透過word-break使用,可以實作讓瀏覽器在任意位置換行。
語法:word-break: normal|break-all|keep-all;
normal | |
yes | |
css3 | |
object.style.wordBreak="keep-all" | |
描述 |
#使用瀏覽器預設的換行規則。
break-all允許在單字內換行。
keep-all
只能在半角空格或連字號處換行。
舉栗子:
<span class="text-s">iIanishttp://www.php.cn/;/span> .text-s { display: inline-block; width: 240px; // word-break: keep-all; }
未設定word-break:
設定word-break:break-all;
定義:允許長單字或URL 位址換行到下一行。 | |
normal | 繼承性: | yes
#版本:
object | .style.wordWrap="break-word"|
---|---|
Compatibility:
Summary:
word-break: When a word cannot be placed at the end of the line, determine how to place the word inside => Determine whether the word will break into a new line when the word cannot be placed at the end of the sentence break-all:Forcibly place it. If the remaining items cannot be squeezed in, they will be displayed on the next line.
keep-all: If it cannot fit, display it in another line; if it still cannot fit, it will display overflow. word-wrap: When the end of the line cannot be placed, determine whether line wrapping is allowed within the word => Determine how to wrap the word within the word normal: The word is too long and will be displayed in a new line. If it exceeds one line, it will be displayed in a new line. Overflow display. break-word:When the word is too long, try to wrap the word first; if it is still too long after the word wrap, you can also wrap the word .
Additional one: text alignmentAttribute: text-align:justify;Compatibility: Very bad ##The above brief analysis of the difference between word-break work-wrap is all the content shared by the editor. I hope it can give you a reference, and I also hope that everyone will support the PHP Chinese website.
For more examples of the difference between word-break work-wrap and related articles, please pay attention to the PHP Chinese website!

在本週的綜述中:Firefox獲得了類似鎖匠的力量,三星的Galaxy Store開始支持Progressive Web Apps,CSS Subgrid正在Firefox發貨

在本週的綜述中:Internet Explorer進入Edge,Google搜索控制台吹捧新的速度報告,而Firefox給出了Facebook&#039; s Notification

蓋茨比(Gatsby)進行了出色的處理和處理圖像。例如,它可以幫助您節省圖像優化的時間,因為您不必手動


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

Dreamweaver CS6
視覺化網頁開發工具

WebStorm Mac版
好用的JavaScript開發工具

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

禪工作室 13.0.1
強大的PHP整合開發環境