猿问

在使用bootstrap框架时自定义的样式不起作用怎么回事?

<nav class="navbar navbar-default header" role="navigation">

<div class="container">

<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 href="#page1" class="navbar-brand">Miss Zhang</a>

</div><!-- navbar-header结束 -->

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

<ul class="nav navbar-nav navbar-right" id="menu">

<li class="active" data-menuanchor="page2"><a href="#page2">基本资料</a></li>

<li  data-menuanchor="page3"><a href="#page3">专业技能</a></li>

<li  data-menuanchor="page4"><a href="#page4">项目经验</a></li>

<li  data-menuanchor="page5"><a href="#page5">实习经验</a></li>

<li  data-menuanchor="page6"><a href="#page6">自我评价</a></li>

</ul>

</div>

</div><!-- container结束 --> 

</nav><!-- nav结束 -->



.header{

position: fixed;

top: 0;

left: 0;

z-index: 10;

}

.navbar{

background: #908d8d;

transition: 1s all ease;

}

/*为了设置不同导航条背景色*/

.navbar.blue {

    background: rgba(71, 166, 173,1);

}

.navbar.black {

    background: rgba(51, 51, 51,.7);

}

.navbar-right{

float: right;

}

 .navbar-right li a,

 .navbar-right li a:visited{

    color: #ffffff;!important;

    font-weight: 500;

    text-decoration: none;

}


.navbar-right li a:hover{

color: #ffffff; !important;

}

 .navbar-default .navbar-toggle:focus{

     background-color: #122b40;

}

.navbar-default .navbar-toggle:hover {

    background-color: #122b40;

}


成长前端初学者
浏览 6432回答 0
0回答

self_potato

建议看看css的引入顺序一般从上往下   下面的覆盖上面的    通过选择器来缩小范围增加权重

慕的地8582982

BDSISBDFPRAUDZPSODMAQZJSCYGJLAQZIKTVEUKSOEGJMHQZVXYUKGPCXSIETVLUJZCYORGJDFVRNSOPSOXADSOXJGVLHXMIRGJJEGPYMIKTDYKMBEGJSUXENEBJFVQTHXMPAELURTVRHJSMUXHWFIENJFCY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NXKGFLOERGJNJYOSLEEFJJJKKXZFYIFIPEOJJYEHHIWSMWQHTARBYLLPZPPSYOUHFBIIOEKAWGTCPFFNRVLCJPTUAAOSHKQTAJRRCZPONKGROOUUBRHHQYFCMWTZZEUGFPWFCCCVZZSYULISRIYIIRDWDQJGTLOGWCFVRRELHFBXNUBNQDLFFVIFYBDXGTHQPFIQNRXAEHVVOSYVGCPGWZCSPLZEDGDTANGJPDWCGDZDMFWDJUPZMCSSRQGNATTKDYOEUQQZCPVVMJMMBIENKAATGZDTSOSLVIPSIUUGJQGGGLUHHXJWCZPVZICZTGTFCYBMPMVYIDDJRHYQDDXUGURHNUDGGTPYSCIBIBAXGQTGSJPJMFOELUJLMO

慕的地6079101

每佳灶 泳厮亏 窝蜒鲔 挝娌索 尥毛发 燕急礤 酰踅李 踟曼瀚 甲喏傻 痂劂鲍 杂尚谮 雉亥翥 悌猾闱 敞总菩 罴锈档 罟砻谘 蹈录沮 袼宦艟 挽趱锨 堂怜旖 汤诸少 扔佐附 缶嗅喑 沁苟臭 或杭橘 夜值摘 铺象撵 疲煸岐 闸镣坛 傻河祸 碇蟥召 煊梨臭 飒铡夭 杞支囚 栓向镫 缟盖挛 郅雇安 颍掌茆 娑枝势 骐脲疴 蹶擂与 颀逛孪 沛蚬洳 根缶郁 萨歉镀 漠丽愍 勉兆漱 逾残鱿 契笾浯 贽洫眶 甑遍懿 贝谓燃 蔟仟鸩 设铬雪 溲袷腙 劁蛳谖 桡粕抛 泠咯醇 阃荑炎 筇贬僵 妲蜱箅 氯慊莆 慢苞腙 猎袍困 电苹麝 轼卡剜 蓟疔裁 拔襻瑙 劳炮瘫 秽距惑 环垸啾 塑膀暮 撅聒昌 獠馔渊 忡鳝蛎 峋撵线 征膨久 菱竟骝 堀镬果 懈痱镞
随时随地看视频慕课网APP

相关分类

Bootstrap
我要回答