課程
/前端開發(fā)
/Bootstrap
/玩轉(zhuǎn)Bootstrap(基礎(chǔ))
怎么使div居中對(duì)齊?
2015-10-17
源自:玩轉(zhuǎn)Bootstrap(基礎(chǔ)) 4-6
正在回答
margin:0 auto;
但這個(gè)盒子必須有寬,只要有寬的塊級(jí)元素居中都要用這句話
<head>
<style>
#main{
????width:400px;
????height:350px;
????margin:0 auto;
}
</style>
</head>
<div id="main">
</div>
舉報(bào)
告訴你使用Bootstrap,并且能夠獨(dú)立定制出適合自己的Bootstrap
2 回答中間對(duì)齊?
3 回答沒有對(duì)齊怎么回事?
1 回答我的右對(duì)齊怎么這樣?
4 回答怎么讓按鈕居中?
3 回答兩端對(duì)齊和左對(duì)齊有什么不一樣??
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-03-24
margin:0 auto;
但這個(gè)盒子必須有寬,只要有寬的塊級(jí)元素居中都要用這句話
2015-10-18
<head>
<style>
#main{
????width:400px;
????height:350px;
????margin:0 auto;
}
</style>
</head>
<div id="main">
</div>