- HTML代码
<div class='uwo-square'><div class='uwo-content'></div></div>
- CSS代码
.uwo-square{
width:20%;
display: inline-block;
position: relative;
text-align: center;
}
.uwo-square:after {
content: "";
display: block;
padding-bottom: 100%;
top: 0;
width: 100%;
}
.uwo-square > .uwo-content{
position: absolute;
width: 100%;
height: 100%;
padding:3px;
}