当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS clear属性

CSS
CSS 介绍
CSS 语法
使用 CSS
CSS 背景
CSS 文字
CSS 字体
CSS 边框
CSS 边距
CSS 填充
CSS 列表
CSS 尺寸
CSS 类别
CSS 定位
CSS 伪类
CSS 伪元素
CSS2 Media类型
CSS 摘要
CSS 实例
CSS2 参考资料
CSS2 打印

CSS clear属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 316 ::
收藏到网摘: n/a

Image and text elements that appear in another element are called floating elements. The clear property sets the sides of an element where other floating elements are not allowed.
图片和文字元素出现在另外元素中,那么它们(图片和文字)可称为浮动元素(floating element)。使用clear属性可以让元素边上不出现其它浮动元素。

Note: This property does not always work as expected if it is used along with the "float" property.
注意:当这个属性随着"float"属性一起使用的话,那么结果可能会不尽如人意

Inherited: No
继承性:无

举例

h2
{
clear: right
}

address
{
clear: both
}

可用值

描述
left No floating elements allowed on the left side
不允许元素左边有浮动的元素
right No floating elements allowed on the right side
不允许元素的右边有浮动的元素
both No floating elements allowed on either the left or the right side
元素的两边都不允许有浮动的元素
none Allows floating elements on both sides
允许元素两边都有浮动的元素

评论 (0) All

登陆 | 还没注册?