1,為什么給absolute設(shè)置height:100%有作用,給relative設(shè)置的話就不會(huì)起作用?2,absolute和relative對子類帶有float的元素會(huì)有差異?如果把div1換成relative就不會(huì)包裹div3,不知是為什么?.div1{border:3pxsolidred;position:absolute;}.div2{background:yellow;width:200px;}.div3{float:left;width:50px;height:300px;background:orange;}.div4{width:100px;height:100px;background:blue;}
absolute和relative的區(qū)別很大?
呼啦一陣風(fēng)
2019-04-21 20:41:50