为了账号安全,请及时绑定邮箱和手机立即绑定

这样写,,挡住了原来的1 2 3

.wrap{    float:left;    position:relative;    left:50%; } .wrap-center{    background:#ccc;    float:left;    position:relative;    left:-50%; }这样写了以后,,挡住了原来的123,,不知道怎么破

正在回答

2 回答

暂时能想到的是这个方法

先将container所有的float删了 这样不浮动  空间就不释放了

.container ul{

list-style:none;

margin:0;

padding:0;

position:relative;

left:-50%;

text-align: center;}

0 回复 有任何疑惑可以回复我~

加上clear:both(针对多个div浮动的清除,float:left不清除,就会导致上面的错位情况)

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

这样写,,挡住了原来的1 2 3

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号