搜尋
首頁web前端css教學word-break work-wrap的區別範例介紹

word-break:【斷詞】

定義:規定自動換行的處理方法.   注意:透過word-break使用,可以實作讓瀏覽器在任意位置換行。

語法:word-break: normal|break-all|keep-all;

##預設值normal繼承性愛yescss3

##Javascript語法object.style.wordBreak="keep-all"值描述normal
 

#使用瀏覽器預設的換行規則。

break-all允許在單字內換行。

word-break work-wrap的区别示例介绍keep-all

只能在半角空格或連字號處換行。

word-break work-wrap的区别示例介绍

相容性:

word-break work-wrap的区别示例介绍

舉栗子:

<span class="text-s">iIanishttp://www.php.cn/;/span>    
.text-s {    
    display: inline-block;    
    width: 240px;    
    // word-break: keep-all;    
}

word-break work-wrap的区别示例介绍未設定word-break:

 

設定word-break:break-all;

 

設定word-break:keep-all;或是word-break:normal; word-wrap:【換行】語法:word-wrap: normal|break-word;#預設值:normalyes
 
 定義:允許長單字或URL 位址換行到下一行。

繼承性:

#版本:

CSS3

JavaScript 語法:.style.wordWrap="break-word"## 值
object
#描述############normal#### ##只在允許的斷字點換行(瀏覽器保持預設處理)。 ############break-word######在長單字或 URL 位址內部進行換行。 ############

Compatibility:

word-break work-wrap的区别示例介绍

##For example: [Same as above]

Word-wrap is not set:

word-break work-wrap的区别示例介绍

Set word-wrap:normal;

word-break work-wrap的区别示例介绍

Set word-wrap:break-word;

word-break work-wrap的区别示例介绍

Compare the above chestnut setting word The difference between -break:break-all; and word-wrap:break-word

word-break work-wrap的区别示例介绍

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 alignment

Attribute: text-align:justify;

Compatibility: Very bad

word-break work-wrap的区别示例介绍

text-align:center;

word-break work-wrap的区别示例介绍

text-align:justify;

word-break work-wrap的区别示例介绍 ##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!

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
每周平台新聞:Galaxy Store的Web應用程序,Tappable Stories,CSS Subgrid每周平台新聞:Galaxy Store的Web應用程序,Tappable Stories,CSS SubgridApr 14, 2025 am 11:20 AM

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

每周平台新聞:Internet Explorer模式,搜索控制台中的速度報告,限制通知提示每周平台新聞:Internet Explorer模式,搜索控制台中的速度報告,限制通知提示Apr 14, 2025 am 11:15 AM

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

CSS自定義屬性的範圍的功率(和樂趣)CSS自定義屬性的範圍的功率(和樂趣)Apr 14, 2025 am 11:11 AM

您可能至少已經對CSS變量有點熟悉了。如果沒有,這是兩秒鐘的概述:它們真的稱為自定義屬性

我們是程序員我們是程序員Apr 14, 2025 am 11:04 AM

構建網站正在編程。編寫HTML和CSS正在編程。我是程序員,如果您在這裡閱讀CSS-Tricks,那麼您很有可能是您

您如何從網站上刪除未使用的CSS?您如何從網站上刪除未使用的CSS?Apr 14, 2025 am 10:59 AM

在這裡,我想預先知道的是:這是一個很難的問題。如果您降落在這裡,因為您希望指向您可以運行的工具

圖片中的圖片網絡API簡介圖片中的圖片網絡API簡介Apr 14, 2025 am 10:57 AM

圖片中的圖片在2016年發行了Macos Sierra,在Safari瀏覽器中首次出現在網絡上。這使用戶可以彈出

使用Gatsby組織和準備圖像以使圖像模糊效果的方法使用Gatsby組織和準備圖像以使圖像模糊效果的方法Apr 14, 2025 am 10:56 AM

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

哦,嘿,填充百分比基於父元素的寬度哦,嘿,填充百分比基於父元素的寬度Apr 14, 2025 am 10:55 AM

今天,我學到了一些有關基於百分比的(%)填充的知識,我腦海中完全錯了!我一直認為百分比填充是基於

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

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

AI Clothes Remover

AI Clothes Remover

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

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
3 週前By尊渡假赌尊渡假赌尊渡假赌
WWE 2K25:如何解鎖Myrise中的所有內容
4 週前By尊渡假赌尊渡假赌尊渡假赌

熱工具

VSCode Windows 64位元 下載

VSCode Windows 64位元 下載

微軟推出的免費、功能強大的一款IDE編輯器

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

WebStorm Mac版

WebStorm Mac版

好用的JavaScript開發工具

Safe Exam Browser

Safe Exam Browser

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

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境