Loading...

破版,很醜!!

Temperature: 0 °C

Mark ChangMark Chang
author_tools


破版,很醜!!
破版......很醜對不對!!

我想這是所有從事網頁設計師的痛~

這時你需要的是可以輕輕鬆鬆協助你過關的CSS

文字強迫換行

word-break: break-all;

使用方式
.divname
{
background-color: #e0ebee;
width: 100%;
max-width:600px;
word-break: break-all;
overflow: auto;
margin: 18px 0 18px 0 !important;
padding-top: 0px; 
}

注意~max width 600px,這表示最寬你給我到600px就好就給我強迫換行~

當然,若排版需要,你還可以有其他選擇~

依單字換行
word-wrap:break-word;

使用契機?

若使用文字強迫換行,太長的英文字,會自動切成兩半。

這時就得使用依單字換行方式~

另外.......

還有一個,死都不要給我換行的選擇。
white-space:nowrap;

請審慎使用之~

https://innstory.com/story-破版很醜-1690
CSS

Prev
 javascript獲取當前時間

Next
分享_有神快拜!日手作達人做出會寫時間的機器人手錶超精緻根本可以直接拿去賣!風傳媒 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

使用 .htaccess 關閉緩存

使用 .htaccess 關...

使用緩存可以提高網站的性能。 可以在.htaccess 文件集標頭中的各種指令指示瀏覽器將文件保留較...

改變input placeholder 字體顏色

改變input placeh...

colorphoto55 通常我們會使用 placeholder 來作為欄位提醒文字~ 通常 pla...

解決iphone 不能使用colorbox 滑動的方式

解決iphone 不能使用c...

pexelsphotoiphone #cboxLoadedContent, #cboxContent...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format