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

Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 12288 bytes) in

Fatal error: A...

今天在客戶的網站系統上發現了一個問題。 在上傳檔案時發生了一個錯誤: Fatal error: Al...

如何修復Undefined Index錯誤訊息

如何修復Undefined ...

錯誤的原因是因為當我們使用 $GET 和 $POST 方法取得變數時會發生這種情況,雖然PHP的部分...

在PHP中如何將NAN轉換為0

在PHP中如何將NAN轉換為...

首先我會得到NAN是因為我有一個計算結果為的值然後我讓他除以,結果就得到了NAN 首先甚麼是NAN?...

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