<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>妙文课堂第一篇</title>
<style>
img{position:absolute;clip:rect(40px,40px,40px,40px);}
</style>
</head>
<body>
<img src="img/03.jpg" width="200px" height="200px"/>
</body>
</html>
你值都一样了,只有一个1个px的像素
clip: rect(40px,100px,100px,20px);
http://www.w3school.com.cn/cssref/pr_pos_clip.asp
clip 属性剪裁绝对定位元素。
当一幅图像的尺寸大于包含它的元素时会发生什么呢?"clip" 属性允许您规定一个元素的可见尺寸,这样此元素就会被修剪并显示为这个形状。