HTML
<div class="idd">
<!-- <img src="176.jpg"> -->
<span class="img"></span>
</div>
css
.idd{
width:100px;height:100px;border:1px solid red;display:table-cell;vertical-align:middle;margin:20px 0;
}
.idd .img{
width:100%;height:100%;background-image:url(edit.jpg);background-size:cover;background-position:50%;display:block;overflow: hidden;
}
时间: 2024-10-09 03:40:55