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

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

CSS clip属性


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

The clip property sets the shape of an element.
clip属性可设置元素的形状

What happens if an image is larger than the element it goes inside? - The "clip" property lets you specify the dimensions of an element that should be visible, and the element is clipped into this shape, and displayed.
如果图象大于元素的范围会怎么样呢? - "clip"属性可以让你设置元素的可视面积,在这个范围内的元素内容才会显示。

Note: This property can not be used for elements with an "overflow" property set to "visible".
注意:这个属性不可以和"overflow"属性设置为"visible"的时候一起使用

Inherited: No
继承性:无

举例

img 
{
clip: rect(10px, 5px, 10px, 5px)
}

可用值

描述
shape Sets the shape of the element. The valid shape value is: rect (top, right, bottom, left)
设置元素的形状。有效的形状值应该像这样:rect(top,right,bottom.left)
auto The browser sets the shape of the element
由浏览器设置元素的形状

评论 (0) All

登陆 | 还没注册?