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

php檢查陣列中大於0的值

php檢查陣列中大於0的值

假設有一個陣列$a $a = array(,,,,,,); 取得大於的數值有幾個 $tempa = ...

Android 禁止螢幕旋轉

Android 禁止螢幕旋轉...

首先找到AndroidManifest.xml檔案 位置在app/manifests/路徑底下 在 ...

Android Fragment及Activity 中使用sharedpreferences

Android Fragme...

在Android下想要儲存執行資料的方式有好幾種,例如存在手機空間或者是資料庫空間。 這裡紀錄一下使...

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