电脑爱好者,提供IT资讯信息及各类编程知识文章介绍,欢迎大家来本站学习电脑知识。 最近更新 | 联系我们 RSS订阅本站最新文章
电脑爱好者
站内搜索: 
当前位置:首页>> HTML>>控制文本的空间:

控制文本的空间

来源:远方网络 | 2005-6-3 22:15:10 | (有1852人读过)

控制文本的空间

根据Cascading Style Sheet规范,你应当可以控制文本行的高度,字母的空间以及单词的空间。然而非常遗憾,当前版本的Netscape和Microsoft的浏览器只支持行高度的属性。下面的HTML文件说明了这些特性(见图7.25):

 

<HTML>

<HEAD>
<TITLE> Style </TITLE>

<STYLE>

<!--

.BigLines {line-height: 200%}

-->

</STYLE>

</HEAD>

<BODY>

<P CLASS=BigLines>

These lines of text have plenty of space between them.

Can you notice the extra space?

These lines of text have plenty of space between them.

Can you notice the extra space?

These lines of text have plenty of space between them.

Can you notice the extra space?

These lines of text have plenty of space between them.

Can you notice the extra space?

</P>

<P>

These lines of text have no space between them.

Do you notice the missing space?

These lines of text have no space between them.

Do you notice the missing space?

These lines of text have no space between them.

Do you notice the missing space?

These lines of text have no space between them.

Do you notice the missing space?

</P>

</BODY>

</HTML>

当这个文件在网络浏览器上显示时,第一段中的文本行之间的空间大小为200%(当前字体大小的两倍)。除了使用百分号外,你也可以使用前面所述的任何一个度量单位,如象素或点。



图7.25 控制行间距
上一篇控制文本的字体
下一篇VBScript介绍
HTML热门文章排行
网站赞助商
购买此位置

 

关于我们 | 网站地图 | 文档一览 | 友情链接| 联系我们

Copyright © 2003-2024 电脑爱好者 版权所有 备案号:鲁ICP备09059398号