我需要为照片裁剪四边形。我需要平行四边形。但它是扭曲的。我需要一个平行四边形裁剪。我该怎么办?
代码如下:
img {
transform: skew(-10deg);
position:relative;
left: 30px;
}

<img src="http://blogs.villagevoice.com/runninscared/RL%20Gang%20Boy.jpg">
&#13;
我想要的是我不希望男孩转身侧身但只想拍照。谢谢。
答案 0 :(得分:1)
答案 1 :(得分:0)
请尝试这个css + html脚本
#graphic {
width: 200px;
height: 100px;
position: relative;
}
#graphic:before {
content: '';
position: absolute;
width: 200px;
height: 50px;
z-index: -1;
background-image: url(http://blogs.villagevoice.com/runninscared/RL%20Gang%20Boy.jpg`enter code here`); /* Image is 500px by 500px, but only 200px by 50px is showing. */
}
<div id="graphic">lorem ipsum</div>