当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS clip属性
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 |
值 | 描述 |
---|---|
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 由浏览器设置元素的形状 |