小白教程
所有教程
关于
Search
172.70.100.47
172.70.100.47
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Pr pos clip”的源代码
本页内容
上一节:
Pr_class_clear
下一节:
Pr_class_cursor
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:clip}}[[Category:css reference|161]] = CSS clip 属性 = 裁剪一张图像: <sample title="" desc="" lang="html" hererun="1"> img { position:absolute; clip:rect(0px,60px,200px,0px); } </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> img { position:absolute; clip:rect(0px,60px,200px,0px); } </style> </head> <body> <img src="w3css.gif" width="100" height="140" /> </body> </html> </run> == 属性定义及使用说明 == 如果图像大于包含它的元素,会发生什么?-clip属性,让你指定一个绝对定位的元素,该尺寸应该是可见的,该元素被剪裁成这种形状并显示。 '''注意::''' 如果先有"overflow:visible",clip属性不起作用。 {| class="table table-striped table-hover" | 默认值: | auto |- | 继承: | no |- | 版本: | CSS2 |- | JavaScript 语法: | object.style.clip="rect(0px,50px,50px,0px)" |} == 浏览器支持 == 表格中的数字表示支持该属性的第一个浏览器版本号。 {| class="table table-striped table-hover" ! 属性 ! Chrome ! Internet Explorer / Edge ! Firefox ! Safari ! Opera |- | clip | 1.0 | 8.0 | 1.0 | 1.0 | 7.0 |} == 属性值 == {| class="table table-striped table-hover" ! 值 ! 描述 |- | shape | 设置元素的形状。唯一合法的形状值是:rect (top, right, bottom, left) |- | auto | 默认值。不应用任何剪裁。 |- | inherit | 规定应该从父元素继承 clip 属性的值。 |} == 相关文章 == CSS 教程: [[css positioning|CSS 定位]]
返回至“
Pr pos clip
”。
上一节:
Pr_class_clear
下一节:
Pr_class_cursor