書式
text-justify:表示方法
対象
ブロックレベル要素
継承
する
初期値
auto
バージョン
-
対応ブラウザ
Win IE5.0以降
解説
文字の表示位置を指定します。text-alignプロパティと組み合わせて使用します。
設定名 | 方法 |
auto | 自動(ブラウザに依存) |
distribute | 単語、文字間を調整して均等割付 |
distribute-all-lines | 1行の文字数が不足している場合でも単語、文字間を調整して均等割付 |
inter-word | 単語間を調整して均等割付 |
inter-ideograph | 2バイト文字(日本語、中国語など)を均等割付 |
inter-cluster | アジア向けの均等割付 |
kashida | アラビア文字を均等割付 |
newspaper | 単語、文字間を調整して均等割付(英語圏) |
サンプルコード
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<style type="text/css"><!--
body { margin:0px; }
div { position:absolute; top:10;left:10px;
width:120px;
text-align:justify;
text-justify:distribute-all-lines;
}
--></style>
</head>
<body>
<div>サンプルテキストです。<br>Sample Text</div>
</body>
</html>