二級li設置float:none; 為什么換成clear:left;后二級li的寬度就不一樣了
?ul li ul li{ float:none;margin-top:2px; background-color:#eee; }?
?ul li ul li{ clear:left;margin-top:2px; background-color:#eee; }?
?ul li ul li{ float:none;margin-top:2px; background-color:#eee; }?
?ul li ul li{ clear:left;margin-top:2px; background-color:#eee; }?
2019-05-10
舉報
2019-06-24
clear有四個值:
none:允許左右兩邊有浮動對象;
both:不允許左右兩邊有浮動對象;
left:不允許左邊有浮動對象;
right:不允許右邊有浮動對象。
2019-05-29
沒有啊,在這段代碼里,這兩個效果沒什么區別,并沒有出現你說的現象