我需要將徽標的高度設置爲與頁眉相同。雖然我將徽標的高度設置爲100%,但不會佔用標頭的高度。我不知道如何將徽標的高度設置爲標題高度。這裏是我的代碼徽標未佔滿頁眉的高度
app.css
body {
font-family: 'Open Sans', sans-serif;
border-top:none;
}
.navbar {
margin-bottom: 0px;
padding: 10px 15px;
}
.navbar img {
width : 100%;
height : 100%;
}
母版頁
你可以看到在頭元素
<header>
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- 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" aria-expanded="false">
<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="#"><img src="~/Images/NGSR-logo.jpg" /> </a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Requests</a></li>
<li><a href="#">Activities</a></li>
<li><a href="#">Reports</a></li>
<li><a href="#">Admin</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Country <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
<li><a href="#">Save View</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</header>
頭視圖的logo參考
問題:如果您從.navbar(CSS)填充 – flynorc
你能可能創建的這一個小提琴什麼的充分CSS會發生什麼? –