删除Bootstrap 3中导航栏按钮的边框

时间:2016-09-10 16:38:28

标签: html css twitter-bootstrap css3 twitter-bootstrap-3

我正在创建一个网页,让我说我有这个导航栏:(礼貌TutorialsPoint

<nav class="navbar navbar-default" role="navigation"> 
   <div class="navbar-header"> 
      <button type="button" class="navbar-toggle" data-toggle="collapse"  
         data-target="#example-navbar-collapse"> 
         <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="#">TutorialsPoint</a> 
   </div> 
   <div class="collapse navbar-collapse" id="example-navbar-collapse"> 
      <ul class="nav navbar-nav"> 
         <li class="active"><a href="#">iOS</a></li> 
         <li><a href="#">SVN</a></li> 
         <li class="dropdown"> 
            <a href="#" class="dropdown-toggle" data-toggle="dropdown"> 
               Java <b class="caret"></b> 
            </a> 
            <ul class="dropdown-menu"> 
               <li><a href="#">jmeter</a></li> 
               <li><a href="#">EJB</a></li> 
               <li><a href="#">Jasper Report</a></li> 
               <li class="divider"></li> 
               <li><a href="#">Separated link</a></li> 
               <li class="divider"></li> 
               <li><a href="#">One more separated link</a></li> 
            </ul> 
         </li> 
      </ul> 
   </div> 
</nav>

这会创建如下边框: borders! codepen.io/aravind-forever/pen/WGQXzL

我想删除buttonnav的边框。我该怎么做呢?我已经尝试了border: none,但这不起作用。

Merci d'avance!

3 个答案:

答案 0 :(得分:2)

请注意你为何遇到困难......

if(JSON.stringify(bag).indexOf(JSON.stringify(object_getting_from_api))==-1) { //write code to insert item into bag[] }

在这里看到它: FIDDLE

&#13;
&#13;
.navbar.navbar-default, .navbar button.navbar-toggle { border: none; }
&#13;
.navbar.navbar-default, .navbar button.navbar-toggle { border: none; }
&#13;
&#13;
&#13;

答案 1 :(得分:0)

让我们保持简单。

对于 nav ,您可以使用:

=WEEKDAY(B$2,16)<3

对于按钮,您可以使用:

.navbar-default{
    border:0px;
}

或者只是将下面的代码复制到CSS文件中:

.navbar-default .navbar-toggle{
    border:0px;
}

如果无效,请尝试在.navbar-default, .navbar-default .navbar-toggle{ border:0px; }

添加!important

答案 2 :(得分:0)

你可能会以错误的顺序打电话给你的样式表, 你可以内联样式[style =“border:none;” ]为导航元素和按钮元素为心爱。

<nav class="navbar navbar-default" role="navigation" style="border: none;"> 
   <div class="navbar-header"> 
      <button type="button" class="navbar-toggle" data-toggle="collapse"  
         data-target="#example-navbar-collapse" style="border: none;"> 
         <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="#">TutorialsPoint</a> 
   </div> 
   <div class="collapse navbar-collapse" id="example-navbar-collapse"> 
      <ul class="nav navbar-nav"> 
         <li class="active"><a href="#">iOS</a></li> 
         <li><a href="#">SVN</a></li> 
         <li class="dropdown"> 
            <a href="#" class="dropdown-toggle" data-toggle="dropdown"> 
               Java <b class="caret"></b> 
            </a> 
            <ul class="dropdown-menu"> 
               <li><a href="#">jmeter</a></li> 
               <li><a href="#">EJB</a></li> 
               <li><a href="#">Jasper Report</a></li> 
               <li class="divider"></li> 
               <li><a href="#">Separated link</a></li> 
               <li class="divider"></li> 
               <li><a href="#">One more separated link</a></li> 
            </ul> 
         </li> 
      </ul> 
   </div> 
</nav>