图片像左右裁剪"/>
css3图片像左右裁剪
html:结构
<div class=" smallpic">
<div>
<a href="javascript:void(0)" class="frame frame-landscape"><img src="../../styles/img/timg-s.png">
</a>
</div>
</div>
css3:样式
.smallpic div>a{
height: 162px;
width: 250px;
}
.frame{
position: relative;
left: 60%;
top: 50%;
transform: translate(-60%,-50%);
-webkit-transform: translate(-60%,-50%);
-ms-transform:translate(-60%,-50%);
overflow: hidden;
更多推荐
css3图片像左右裁剪
发布评论