0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【CSS】line-breakの使い方

Posted at

プログラミング勉強日記

2021年3月9日

line-breakとは

 改行規則の厳密さを指定するときに使用する。

line-breakの使い方

CSS
white-space: ;

 この値には、auto, loose, normal, strict, anywhereのどれかを指定する。

 autoは初期値で、既定の改行規則を使用して改行する。
 looseは、最低限の改行規則でテキストを改行する。一般的には、新聞のような短い行を扱うときに使用される。
 normalは、一般的な改行規則を使用して改行する。
 strictは、細かい改行規則を適用する。
 anywhereは、テキスト中のどこでも改行する可能性がある。
 
 strictのときは、日本語の小文字かな(ぁぃぅぇぉヵ)の直前では改行は行わない。
 normal, looseのときは、日本語や中国語のハイフン(-, ~)の直前での改行は許される。
 looseのときは、反復記号(々〻ゝゞヽヾ )の直前、分離不可能な文字(‥…)の途中、日本語や中国語の特定の句読点(・:;・‼⁇⁈⁉!?)の直前、接頭辞の直前と直後での改行は許される。

参考文献

line-break
CSSで改行ルールを簡単設定!改行をコントロールする方法
line-break …… 改行規則の厳密さを指定する
line-break・・・禁則処理のしかたを指定する(IEがCSS3の草案を先行採用)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?