課程
/前端開發(fā)
/Bootstrap
/基于bootstrap的網(wǎng)頁開發(fā)
老師,為什么我的導(dǎo)航條沒有居中呀
2016-11-26
源自:基于bootstrap的網(wǎng)頁開發(fā) 3-1
正在回答
這樣其實(shí)已經(jīng)居中了,只是內(nèi)容還是在容器的左側(cè)
你試一下在。container容器中加一個(gè)text-center
我有設(shè)置了的,但是沒效果。。。
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role = "navigation"> ? ?<div class="container"> ? ? ? ?<!-- Brand and toggle get grouped for better mobile display --> ? ? ? ?<div class="navbar-header"> ? ? ? ? ? ?<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> ? ? ? ? ? ? ? ?<span class="sr-only">Toggle navigation</span> ? ? ? ? ? ? ? ?<span class="icon-bar"></span> ? ? ? ? ? ? ? ?<span class="icon-bar"></span> ? ? ? ? ? ? ? ?<span class="icon-bar"></span> ? ? ? ? ? ?</button> ? ? ? ? ? ?<a class="navbar-brand" href="#">現(xiàn)代瀏覽器博物館</a> ? ? ? ?</div>
居中要給容器選.container不是.container-fluid
舉報(bào)
Bootstrap框架的基礎(chǔ)教程,學(xué)會(huì)用Bootstrap前端框架搭建網(wǎng)頁
2 回答導(dǎo)航條居中問題
1 回答怎樣將導(dǎo)航條中的部分導(dǎo)航右置
1 回答導(dǎo)航條顏色
2 回答導(dǎo)航條背景
1 回答有關(guān)導(dǎo)航條的
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-11-30
這樣其實(shí)已經(jīng)居中了,只是內(nèi)容還是在容器的左側(cè)
你試一下在。container容器中加一個(gè)text-center
2016-11-26
我有設(shè)置了的,但是沒效果。。。
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role = "navigation">
? ?<div class="container">
? ? ? ?<!-- Brand and toggle get grouped for better mobile display -->
? ? ? ?<div class="navbar-header">
? ? ? ? ? ?<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
? ? ? ? ? ? ? ?<span class="sr-only">Toggle navigation</span>
? ? ? ? ? ? ? ?<span class="icon-bar"></span>
? ? ? ? ? ? ? ?<span class="icon-bar"></span>
? ? ? ? ? ? ? ?<span class="icon-bar"></span>
? ? ? ? ? ?</button>
? ? ? ? ? ?<a class="navbar-brand" href="#">現(xiàn)代瀏覽器博物館</a>
? ? ? ?</div>
2016-11-26
居中要給容器選.container不是.container-fluid