关注此page为导航栏品牌使用图像 Logo 而不是文本,我遇到了这个问题,即肖像 Logo 已被其后的任何内容/文本/图像/轮播切断。
我该如何解决?
<!-- 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>
结果:
最佳答案
为 img 添加最大高度。
max-height: 100%;
height: 100%;
width: auto;
关于html - Bootstrap navbar-brand logo - 肖像图像已被切断?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37730603/