当前位置: 首页 > 文档资料 > HTML 入门教程 >

<multicol>

优质
小牛编辑
123浏览
2023-12-01

Function

HTML 标记用于创建多列文本,并允许您控制列的大小和数量。

标记可以包含任何其他HTML内容,非常类似于标记。 标记内的所有内容都像传统内容一样显示,除了Netscape 4将内容放入多列而不是一列。

此标记仅由Netscape 3及更高版本支持。

HTML和XHTML之间的区别

没有

例子 (Example)

以下示例将在Netscape 4中创建三列布局。

<h1>Breaking News</h1>
<multicol cols = 3>
   <p>State media said more than 2,000 soldiers, police and miners 
   closed the breach in the dike in Shandong province early Sunday and 
   installed pipes and five high-speed pumps, but gave no indication if 
   there were any signs of life.</p>
   <p>The Huayuan Mining Co. mine flooded on Friday afternoon when the 
   Wen river burst a dike, sending water pouring into a shaft and trapping 
   172 miners, Xinhua and state television said.</p>
</multicol>

属性 (Attributes)

属性描述
colsnumber指定文本显示的文本列数。 浏览器尝试在列之间均匀地流动元素,以使每列具有大致相同的高度。 除非存在WIDTH属性,否则将调整列宽以填充可用宽度。
gutternumber指定每列之间的距离(以像素为单位)。
widthnumber指定每列的宽度(以像素为单位)。 所有列的宽度都相同。 如果此属性不存在,则根据装订线宽度和列数计算其值。

标准属性

Sr.No属性和描述
1class

文档范围标识符

2dir

指定文本的方向

3id

文档范围标识符

4style

有助于包含内联casecadubf样式表。

5lang

设置语言代码。

6xml:lang

设置语言代码。