2016-04-25 12 views
0

navbarコンポーネントのボーダー半径を変更/削除しようとしています。私はここで解説した解決策、How to remove the "border-radius" of the navbar-inverse in Bootstrap 3?を試しました。ブートストラップでnavbarのボーダー半径を変更するには?

私がバイオリンを作成しました:https://jsfiddle.net/fts1b0z9/

HTML:

<!DOCTYPE html> 
{% autoescape true %} 
<html lang="en"> 
<head> 
    <title>Bootstrap Case</title> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <link type="text/css" rel="stylesheet" href="/stylesheets/main.css"/> 
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> 
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> 
</head> 
<body> 

<div class = "mainDiv"> 
    <nav class="navbar navbar-inverse" style="border-radius:none !important"> 
     <div class="container-fluid"> 
     <div class="navbar-header" style="border-radius:none !important"> 
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> 
      <span class="icon-bar"></span> 
      <span class="icon-bar"></span> 
      <span class="icon-bar"></span>       
      </button> 
      <a class="navbar-brand" href="#">Website</a> 
     </div> 
     <div class="collapse navbar-collapse" id="myNavbar"> 
      <ul class="nav navbar-nav navbar-right"> 
      <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> 
      </ul> 
     </div> 
     </div> 
    </nav> 

    <div class="container"> 
     <h3>Collapsible Navbar</h3> 
     <p>In this example, the navigation bar is hidden on small screens and replaced by a button in the top right corner (try to re-size this window). 
     <p>Only when the button is clicked, the navigation bar will be displayed.</p> 
    </div> 
</div> 
</body> 
</html> 
{% endautoescape %} 

CSS:

あなたが気付いた場合
.navbar-header{ 
    color: #5e0231; 
    background-color: #5e0231; 
} 

.container-fluid{ 
    color: #5e0231; 
    background-color: #5e0231; 
    width:1000px; 
} 
.mainDiv{ 
    width:1000px; 
    position: fixed; 
    top: 25%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
} 

、ボーダーのうち栗色流出。私はこれを解決する方法がわかりません。

誰かがこの問題を解決するのに役立ちます。

ありがとうございます!

+0

.navbar-inverse {border-radius:0;} –

答えて

0

最も単純:

.navbar-inverse { 
    border-radius: 0; 
} 

が動作していませんか?それともあなたが意味するものではありませんか?

0

ブートストラップ宣言の後にカスタムスタイルシートを定義します。

.navbar { 
    border-radius: 0; 
} 
関連する問題