7-3-15.cfm.htm

来自「非常完整的ASP教程几乎所有会用到的特殊技巧皆已函括教程简捷清析可让你在短时间内」· HTM 代码 · 共 128 行

HTM
128
字号
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>控制文本的对齐方式</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>

<body>
<font FACE="宋体"><b>

<p ALIGN="JUSTIFY">控制文本的对齐方式</p>
</b></font><font FACE="宋体" SIZE="3">

<p ALIGN="JUSTIFY">你可以使用text-align属性的三个值left、center和right来对齐文本。更好的是,在Netscape 
Navigator 4.0和Internet Explorer 4.0中,你可以建立完全调整过的文本。表7.5使用了text-align属性的所有四个值(见图7.28):</p>
<b>

<p ALIGN="JUSTIFY">表7.5 对齐方式举例</p>
</b>

<p ALIGN="JUSTIFY">&lt;HTML&gt;</p>

<p ALIGN="JUSTIFY">&lt;HEAD&gt;<br>
&lt;TITLE&gt; Style &lt;/TITLE&gt;</p>

<p ALIGN="JUSTIFY">&lt;STYLE&gt;</p>

<p ALIGN="JUSTIFY">&lt;!--</p>

<p ALIGN="JUSTIFY">.Left {text-align: left}</p>

<p ALIGN="JUSTIFY">.Right {text-align: right}</p>

<p ALIGN="JUSTIFY">.Center {text-align: center}</p>

<p ALIGN="JUSTIFY">.Justify {text-align: justify}</p>

<p ALIGN="JUSTIFY">--&gt;</p>

<p ALIGN="JUSTIFY">&lt;/STYLE&gt;</p>

<p ALIGN="JUSTIFY">&lt;/HEAD&gt;</p>

<p ALIGN="JUSTIFY">&lt;BODY&gt;</p>

<p ALIGN="JUSTIFY">&lt;P CLASS=Left&gt;</p>

<p ALIGN="JUSTIFY">This text is left aligned. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is left aligned. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is left aligned. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is left aligned. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is left aligned. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is left aligned. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">&lt;/P&gt;</p>

<p ALIGN="JUSTIFY">&lt;P CLASS=Right&gt;</p>

<p ALIGN="JUSTIFY">This text is right aligned. See how the edges of this paragraph line 
up.</p>

<p ALIGN="JUSTIFY">This text is right aligned. See how the edges of this paragraph line 
up.</p>

<p ALIGN="JUSTIFY">This text is right aligned. See how the edges of this paragraph line 
up.</p>

<p ALIGN="JUSTIFY">This text is right aligned. See how the edges of this paragraph line 
up.</p>

<p ALIGN="JUSTIFY">This text is right aligned. See how the edges of this paragraph line 
up.</p>

<p ALIGN="JUSTIFY">This text is right aligned. See how the edges of this paragraph line 
up.</p>

<p ALIGN="JUSTIFY">&lt;/P&gt;</p>

<p ALIGN="JUSTIFY">&lt;P CLASS=Center&gt;</p>

<p ALIGN="JUSTIFY">This text is centered. I float in the middle of the screen.</p>

<p ALIGN="JUSTIFY">This text is centered. I float in the middle of the screen.</p>

<p ALIGN="JUSTIFY">This text is centered. I float in the middle of the screen.</p>

<p ALIGN="JUSTIFY">This text is centered. I float in the middle of the screen.</p>

<p ALIGN="JUSTIFY">This text is centered. I float in the middle of the screen.</p>

<p ALIGN="JUSTIFY">This text is centered. I float in the middle of the screen.</p>

<p ALIGN="JUSTIFY">&lt;/P&gt;</p>

<p ALIGN="JUSTIFY">&lt;P CLASS=Justify&gt;</p>

<p ALIGN="JUSTIFY">This text is justified. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is justified. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is justified. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is justified. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is justified. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">This text is justified. See how the edges of this paragraph line up.</p>

<p ALIGN="JUSTIFY">&lt;/P&gt;</p>

<p ALIGN="JUSTIFY">&lt;/BODY&gt;</p>

<p ALIGN="JUSTIFY">&lt;/HTML&gt;</p>

<p ALIGN="JUSTIFY"><img SRC="Image71.gif" tppabs="http://210.74.168.175/guide/asp/part7/Image71.gif" WIDTH="593" HEIGHT="413"></p>
<b>

<p ALIGN="CENTER">图7.28 使用style sheet来对齐文本</p>
</b></font>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?