div里东西怎么显示到外面去了【简化版】_html/css_WEB-ITnose
来源:动视网
责编:小采
时间:2020-11-27 15:52:47
div里东西怎么显示到外面去了【简化版】_html/css_WEB-ITnose
div里东西怎么显示到外面去了【简化版】_html/css_WEB-ITnose:上个问题我自己描述的太罗嗦了,重开一个= = hehe div#a { background-color:#F00; width:50%; height:500px; } div#c { background-color:#000; width:30%; height:40%; } div#b { background-colo
导读div里东西怎么显示到外面去了【简化版】_html/css_WEB-ITnose:上个问题我自己描述的太罗嗦了,重开一个= = hehe div#a { background-color:#F00; width:50%; height:500px; } div#c { background-color:#000; width:30%; height:40%; } div#b { background-colo

上个问题我自己描述的太罗嗦了,重开一个= =
b里面的东西居然显示到了外面,而且关键是我的d是float到右边的,居然会把b里的东西撑到最下面,不是太理解是什么情况。
回复讨论(解决方案)
b元素左浮动就好
b元素左浮动就好
搞明白了,其实没错,只是要把margin-left去掉,因为float:right已经贴在最右边了
div里东西怎么显示到外面去了【简化版】_html/css_WEB-ITnose
div里东西怎么显示到外面去了【简化版】_html/css_WEB-ITnose:上个问题我自己描述的太罗嗦了,重开一个= = hehe div#a { background-color:#F00; width:50%; height:500px; } div#c { background-color:#000; width:30%; height:40%; } div#b { background-colo