</div><div3></div><div4></div></div></body>div1宽度100%div2和div4宽度40pxdiv2,div3左浮动div4右浮动div3占完剩余部分
2 回答
湖上湖
TA贡献2003条经验 获得超2个赞
<!DOCTYPE html> < html > < head > < meta charset = "utf-8" /> < title >_</ title > < style type = "text/css" > .div1{ width:100%; } .div2{ width:40px; float:left; background:#aaa; } .div3{ width:calc(100% - 80px); float:left; background:#ccc; } .div4{ width:40px; float:right; background:#eee; } </ style > </ head > < body > < div class = "div1" > < div class = "div2" >2</ div > < div class = "div3" >3</ div > < div class = "div4" >4</ div > </ div > </ body > </ html > |
- 2 回答
- 0 关注
- 325 浏览
添加回答
举报
0/150
提交
取消