- 热门文章:
- · 控制字体的Weight
- · 同时控制多个字体属性
- · 控制文本的对齐方式
- · 控制段落的缩进
- · 控制背景色和前景色
- · 使用background属性控制图象
- · 精确安置空白
- · 在网页中加入Style
- · 使用Cascading Style Sheet建立Layer
- · 建立边框
- · 为多个网页使用Style Sheet
- · 在HTML标识符中加入Styles
控制文本的空间
控制文本的空间
根据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 控制行间距
- · 在HTML标识符的Class中加入Styles
- · 在class中加入styles
- · 第七章 高级HTML
- · 为单一的HTML标识符加上styles
- · 使用SPAN和DIV来加入styles
- · 格式化Style Sheets
- · 这一章介绍如何使用Visual Basic的Scripting版本(VBScript),Active Sever Pages的缺省脚本语言
- · 用IF
- · 用FOR循环执行重复操作
- · 使用字符串函数
- · 抽取字符串
- · 替换字符串
- · 搜索字符串
- · 比较字符串
- · 创建子例程
- · 创建函数
- · 使用随机数
- · 隐藏错误
- · 声明变量
- · 变量子类型
- · 变量数据范围
- · 声明常量
- · 创建和修改数组
- · 数组函数
- · 注释Visual Basic脚本
- · 在脚本中增加日期和时间函数
- · 格式化货币值
- · 格式化数字
- · 使用数学运算符和函数
- · 使用逻辑连接和运算符
- · 本章讲述怎样使用Active Server Pages中包含的第二种脚本语言JScript,与VBScript一样,JScript可用来扩展HTML,使它不仅仅是网页格式描述语言
- · 使用JScript函数
- · 使用分支语句(if
- · 使用循环(for
- · 指定缺省对象(with)
- · 建立JScript脚本
- · 建立JScript脚本
- · 使用数学运算(数学对象)
