[英]Bootstrap navbar-brand logo - portrait image has been cut off?
在此頁面后面使用導航徽標而不是文字徽標表示導航欄品牌時,我遇到了以下問題: 縱向徽標已被其后的任何內容/文本/圖像/旋轉符號切斷。
我該如何解決?
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" 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="#">
<img src="http://placehold.it/150x200&text=Logo" alt="">
</a>
</div>
結果:
嘗試在您的導航欄中添加z索引,就像在CSS文件中那樣,因為它看起來像您的前景圖像重疊了它
.navbar-header {
z-index: 100;
}
將最大高度添加到img。
max-height: 100%;
height: 100%;
width: auto;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.