편집 : 버전 2 : http://jsfiddle.net/mtaU8/4/은 bg 변경과 함께 작동합니다. 여기
나중에 이동 : http://jsfiddle.net/mtaU8/
HTML은 (. 나는 배경으로 div
을 사용하지만, 당신은 쉽게 img
요소를 사용할 수 있습니다)
<div class="container">
<div class="img"></div>
</div>
CSS : (설정을위한 대부분 보풀 있지만, 기본적으로 :after
콘텐츠에 transform:rotate()
을 사용하고 그림을 멋지게 잘 배치하도록 배치하십시오. 컨테이너에있는 모든 내용을 포함하면 잘 갈 수 있습니다.
.container {
width: 250px;
height: 100px;
position: relative;
overflow:hidden;
}
.img {
width: 250px;
height: 100px;
background-color: blue;
position: relative;
}
.img:after{
content:"";
position: absolute;
width: 400px;
height:125px;
background-color: white;
top:90px;
left:-20px;
transform: rotate(5deg);
-moz-transform: rotate(5deg);
-webkit-transform: rotate(5deg);
}
: 경계 트릭 (또는 그라디언트)을 사용하여 수행해야합니다. – powerbuoy