使梯形我想打一个梯形填充画面,就像这样:从图像
我不需要旋转。我不需要倾斜图片。 transform: matrix
不起作用!
解决方案几乎只找到需要的两段代码连接:
background-image:url("http://3.bp.blogspot.com/-D9i-wqTIjFw/T5x_51p2rJI/AAAAAAAABLs/VytuZcJGNuY/s400/indahnya.jpg");
这一良好代码:
.myShape {
width: 0;
height: 50px;
border-left: 50px solid red;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
}
我不认为这是可能的2D变换;你需要'rotateY'的视角。 – Ryan
例如,http://codepen.io/minitech/pen/GbDHn。你可以对任何图像做同样的事情。 – Ryan
或者你是说你只是想将图像裁剪成梯形区域? – Ryan