White Space
テキストのスペースやタブや改行をどのように表示させるか設定します。
PREで、改行位置の判断基準は和文の場合、句読点で行います。
このプロパティーは、IE5.5から対応しています。
{ white-space : normal | pre | nowrap }
折り返して表示
テキストのスペースやタブや改行をそのまま表示し、折り返しします。
{ white-space : pre }
white-space: pre;
<style type="text/css">
<!--
p.sample-pre { font-size: 10.5pt; line-height: 1.25em; font-family: "MS
ゴシック"; white-space: pre;
margin: 0pt 4% 8px; }
-->
</style>
<p class="sample-pre">p.style
{ font-size: 10pt; font-family: Arial, Hervetica;<br>
color: rgb(51,51,204); margin: 0pt 4% 4px; }<br>
p.sample-normal { font-size: 10.5pt; line-height: 1.25em; white-space: pre;<br>
margin: 0pt 4% 8px; }</p>
折り返えさないで表示
テキストのスペースやタブや改行をそのまま表示し、折り返えしません。
{ white-space : nowrap }
white-space: nowrap;
<style type="text/css">
<!--
p.sample-nowrap { font-size: 10.5pt; line-height: 1.25em; font-family: "MS
ゴシック"; white-space: nowrap;
margin: 0pt 4% 8px; }
-->
</style>
<p class="sample-nowrap">p.style
{ font-size:
10pt; font-family: Arial, Hervetica;<br>
color: rgb(51,51,204); margin: 0pt 4% 4px; }<br>
p.sample-font { font-size: 10.5pt; line-height: 1.25em; white-space: nowrap;<br>
margin: 0pt 4% 8px; }</p>
|
|
|
|---|