按钮在引导程序中显示为全屏

时间:2016-04-23 21:56:23

标签: css twitter-bootstrap

我正在尝试使用一些新东西的bootstrap我试图使导航栏响应,我希望我的列表应该出现在导航栏上o =用于med或大屏幕,并作为按钮用于超小屏幕设备作为切换按钮,但对我来说,即使是大屏幕,它显示切换按钮 这是我的代码

INSERT/REPLACE/UPDATE/DELETE

请帮帮我。我在EDGE和chrome中尝试了这段代码

1 个答案:

答案 0 :(得分:1)

根据Official Bootstrap Documentation

简单修复只需用 hide-sm-up 替换 visible-xs-block (这甚至不是引导类)。

<!DOCTYPE html>
<html>
  <head>
    <script src="http://code.jquery.com/jquery.min.js"></script>
    <script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
    <link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css"/>
  </head>
  <body>
    <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggled-collapsed visible-xs-block pull-right" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <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="#" class="navbar-brand">Restorante con fusion </a>
        </div>
        <div id="navbar" class="navbar-collapse collapse navbar-right">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#">About</a></li>
            <li><a href="#">Menu</a></li>
            <li><a href="#">Contact</a></li>
          </ul>
        </div>
      </div>
    </nav>
    <header class="jumbotron">
      <!-- Main component for a primary marketing message or call to action -->
      <div class="container">
        <div class="row row-header">
          <div class="col-xs-12 col-sm-8">
            <h1>Ristorante con Fusion</h1>
            <p style="padding:40px;"></p>
            <p>We take inspiration from the World's best cuisines, and create a unique fusion experience. Our lipsmacking creations will tickle your culinary senses!</p>
          </div>
          <div class="col-xs-12 col-sm-4">
          </div>
        </div>
      </div>
    </header>
    <div class="container">
      <div class="row">
        <div class="row row-content">
          <div class="col-xs-12 col-sm-3 col-sm-push-9">
            <p style="padding:20px;"></p>
            <h3 align=center>Our Lipsmacking Culinary Creations</h3>
          </div>
          <div class="col-xs-12 col-sm-9 col-sm-pull-3">
            <h2>Uthappizza</h2>
            <p>A unique combination of Indian Uthappam (pancake) and Italian pizza, topped with Cerignola olives, ripe vine cherry tomatoes, Vidalia onion, Guntur chillies and Buffalo Paneer.</p>
            <p><a href="#">More &raquo;</a></p>
          </div>
        </div>
        <div class="row row-content">
          <div class="col-xs-12 col-sm-3 col-sm-push-9">
            <p style="padding:20px;"></p>
            <h3 align=center>This Month's Promotions</h3>
          </div>
          <div class="col-xs-12 col-sm-9 col-sm-pull-3">
            <h2>Weekend Grand Buffet</h2>
            <p>Featuring mouthwatering combinations with a choice of five different salads, six enticing appetizers, six main entrees and five choicest desserts. Free flowing bubbly and soft drinks. All for just $19.99 per person </p>
            <p><a href="#">More &raquo;</a></p>
          </div>
        </div>
        <div class="row row-content">
          <div class="col-xs-12 col-sm-3 col-sm-push-9">
            <p style="padding:20px;"></p>
            <h3 align=center>Meet our Culinary Specialists</h3>
          </div>
          <div class="col-xs-12 col-sm-9 col-sm-pull-3">
            <h2>Alberto Somayya</h2>
            <h4>Executive Chef</h4>
            <p>Award winning three-star Michelin chef with wide International experience having worked closely with whos-who in the culinary world, he specializes in creating mouthwatering Indo-Italian fusion experiences. </p>
            <p><a href="#">More &raquo;</a></p>
          </div>
        </div>
      </div>
    </div>
    <footer>
      <div class="container">
        <div class="row row-footer">
          <div class="col-xs-5 col-xs-offset-1 col-sm-2 col-sm-offset-1">
            <h5>Links</h5>
            <ul class="list-unstyled">
              <li><a href="#">Home</a></li>
              <li><a href="#">About</a></li>
              <li><a href="#">Menu</a></li>
              <li><a href="#">Contact</a></li>
            </ul>
          </div>
          <div class="col-xs-6 col-sm-5">
            <h5>Our Address</h5>
            <address>
              121, Clear Water Bay Road<br>
              Clear Water Bay, Kowloon<br>
              HONG KONG<br>
              Tel.: +852 1234 5678<br>
              Fax: +852 8765 4321<br>
              Email: <a href="mailto:confusion@food.net">confusion@food.net</a>
            </address>
          </div>
          <div class="col-xs-12 col-sm-4">
            <div style="padding: 40px 10px;">
              <a href="http://google.com/+">Google+</a>
              <a href="http://www.facebook.com/profile.php?id=">Facebook</a>
              <a href="http://www.linkedin.com/in/">LinkedIn</a>
              <a href="http://twitter.com/">Twitter</a>
              <a href="http://youtube.com/">YouTube</a>
              <a href="mailto:">Mail</a>
            </div>
          </div>
          <div class="col-xs-12 col-sm-12">
            <p style="padding:10px;"></p>
            <p align=center>© Copyright 2015 Ristorante Con Fusion</p>
          </div>
        </div>
      </div>
    </footer>
  </body>
</html>