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

當XAMPP遇到VMWARE占用PORT 443導致無法啟動APACHE

當XAMPP遇到VMWARE...

在使用XAMPP時,若系統有安裝 VMWare Workstation,VMWare會將 port ...

CSS3濾鏡Filter的十種特效

CSS3濾鏡Filter的十...

CSS 濾鏡效果 Filters 主要是運用在圖片上,以實現一些特效。 grayscale 灰階 s...

讓文字左右對齊

讓文字左右對齊

讓文字左右對齊這類的設計案,通常都會出現在平面設計居多。 網頁上很少會遇到客戶會執著於這方面,但不能...

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