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

word-break work-wrap的區別範例介紹

Mar 04, 2017 am 10:29 AM

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

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

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

AI Clothes Remover

AI Clothes Remover

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

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

<🎜>:泡泡膠模擬器無窮大 - 如何獲取和使用皇家鑰匙
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
北端:融合系統,解釋
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
Mandragora:巫婆樹的耳語 - 如何解鎖抓鉤
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1666
14
CakePHP 教程
1425
52
Laravel 教程
1324
25
PHP教程
1272
29
C# 教程
1251
24
靜態表單提供商的比較 靜態表單提供商的比較 Apr 16, 2025 am 11:20 AM

讓我們嘗試在這裡造成一個術語:“靜態表單提供商”。你帶上html

使Sass更快的概念證明 使Sass更快的概念證明 Apr 16, 2025 am 10:38 AM

在一個新項目開始時,Sass彙編發生在眼睛的眨眼中。感覺很棒,尤其是當它與browsersync配對時,它重新加載

每周平台新聞:HTML加載屬性,主要的ARIA規格以及從iframe轉移到Shadow dom 每周平台新聞:HTML加載屬性,主要的ARIA規格以及從iframe轉移到Shadow dom Apr 17, 2025 am 10:55 AM

在本週的平台新聞綜述中,Chrome引入了一個用於加載的新屬性,Web開發人員的可訪問性規範以及BBC Move

與部分元素的交易 與部分元素的交易 Apr 12, 2025 am 11:39 AM

同一天發表了兩篇文章:

帶有HTML對話框元素的一些動手 帶有HTML對話框元素的一些動手 Apr 16, 2025 am 11:33 AM

這是我第一次查看HTML元素。我已經意識到了一段時間,但是尚未將其旋轉。它很酷,

我們如何標記Google字體並創建Goofonts.com 我們如何標記Google字體並創建Goofonts.com Apr 12, 2025 pm 12:02 PM

Goofonts是由開發人員和設計師丈夫簽名的附帶項目,它們都是版式的忠實擁護者。我們一直在標記Google

多腳步滑塊:一般案例 多腳步滑塊:一般案例 Apr 12, 2025 am 10:52 AM

這個兩部分系列的第一部分詳細介紹了我們如何獲得兩次跑步的滑塊。現在,我們&#039;

'訂閱播客”鏈接應在哪裡? '訂閱播客”鏈接應在哪裡? Apr 16, 2025 pm 12:04 PM

有一段時間,iTunes是播客中的大狗,因此,如果您將“訂閱播客”鏈接到喜歡:

See all articles