前端之家收集整理的这篇文章主要介绍了
用 CSS 实现将一张图片截取为一个正方形,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<table class="html5"><tbody><tr class="li1">
<td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Box">
>
>
>
.imgBox{
width: 200px;
height: 0;
padding-bottom: 200px;
overflow: hidden;
}
.imgBox img {
width:200px;
min-height: 200px;
}
>