1
1

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】word-breakの使い方

Posted at

プログラミング勉強日記

2021年3月11日

word-breakとは

 改行方法を指定する。要素からテキストがはみ出る場合に改行方法を制御する。

word-breakの使い方

CSS
word-break: ;

この値には、normal, break-all, keep-allのどれかを指定する。

 normalは初期値で、既定の改行規則を適用する。
 break-allは、要素の幅に合わせて改行する。(単語の途中であっても改行する。)
 keep-allは、CJK(中国語、台湾語、日本語、韓国語)の改行を許可しない。

参考文献

CSSのword-breakプロパティを使った文章の改行の仕方を現役エンジニアが解説【初心者向け】
word-breakプロパティの意味と使い方

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?