防止iPhone上的导航栏品牌延伸徽标

时间:2015-03-11 06:23:26

标签: css iphone twitter-bootstrap navbar

我有一个navbar-brand with a logo and button,当菜单折叠时,他们在iPhone上查看时会伸展。

我该如何防止这种情况?

<header id="header">

    <nav class="navbar navbar-inverse navbar-fixed-top" role="banner">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".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="index.html"><img src="images/logo.png" alt="logo"></a>
                <div class="slogan"><p>  PERTAMA DI INDONESIA : </p><div class="slogs">Dengan Formula Plastik Baja</div><p></p></div>
            </div>

            <div class="collapse navbar-collapse navbar-right">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="index.html">HOME</a></li>
                    <li><a href="products.html">PRODUCTS</a></li>
                    <li><a href="works.html">HOW IT WORKS</a></li>
                    <li><a href="projects.html">OUR PROJECTS</a></li>
                    <li><a href="contact.html">CONTACT</a></li>
                </ul>
            </div>
        </div><!--/.container-->
    </nav><!--/nav-->
</header>

1 个答案:

答案 0 :(得分:0)

尝试添加class =&#34; img-responsive&#34; img。

<a class="navbar-brand" href="index.html">
  <img class="img-responsive" src="images/logo.png" alt="logo">
</a>