用absolute+relative不是也可以实现水平居中吗?
.container{
position:absolute;
left:50%
}
.ul{
width:250px;
height:250px;
border:1px red solid;
list-style:none;
margin:0;
padding:0;
position:relative;
left:-50%;
}
.container{
position:absolute;
left:50%
}
.ul{
width:250px;
height:250px;
border:1px red solid;
list-style:none;
margin:0;
padding:0;
position:relative;
left:-50%;
}
2018-09-19
举报