亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何設置一個寬度為1/6的div?

如何設置一個寬度為1/6的div?

慕運維7130634 2017-11-24 15:21:37
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{ margin: 0; padding: 0; } .box{ width: 100%; height: 200px; border: 1px solid #ccc; } .box_box{ height: 100%; background: #FF4400; float: left; width: ;/*我想把每個div的寬都設成1/6的寬度,怎么寫?*/ } </style> </head> <body> <div class="box"> <div class="box_box"></div> <div class="box_box"></div> <div class="box_box"></div> <div class="box_box"></div> <div class="box_box"></div> <div class="box_box"></div> </div> </body></html>
查看完整描述

1 回答

已采納
?
情若自控3943916

TA貢獻12條經驗 獲得超3個贊

*{
? ?margin: 0;
? ?padding: 0;
}
.box{
? ?display: flex;
? ?width: 100%;
? ?height: 200px;
? ?border: 1px solid #ccc;
}
.box_box{
? ?flex: 1;
? ?height: 100%;
? ?background: #ffe9e0;
? ?float: left;
? ?margin-right: 5px;
}
.box_box:last-child{
? ?margin-right: 0px;
}

css部分,其余沒動



查看完整回答
反對 回復 2017-11-24
  • 1 回答
  • 0 關注
  • 1376 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號