从我的手机访问时,站点没有显示移动布局(Bootstrap 3)

时间:2014-05-19 12:54:31

标签: html css mobile twitter-bootstrap-3

我最近建立了一个网站,我使用bootstrap使其响应。一切都工作得非常顺利,当我缩小浏览器时,它改变了布局,因此我认为当我从手机上访问它时它会以同样的方式工作,但事实证明我是错误的是,当我从手机访问该网站时,它显示常规网站,它不会渲染以使用移动版面。

我的代码只是简单的HTML,我使用bootstrap 3,有什么建议吗?

先谢谢了。

<html lang="en">

<head>
    <!--Seg:header-->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap/js/bootstrap.min.js"></script>
    <script src="js/edison.js"></script>
    <!-- Bootstrap -->
    <link href="js/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="css/edison.css" rel="stylesheet">   

</head>

<body>

<div class="container">

<div class="header">
<span id="leftHeaderImg">
<a href="index.html"><img src="images/header.gif" /></a>
</span>
<span class="header-right-block">
<div class="header-medium-text">"One call does it all"</div>
<div class="header-phone">800-875-9626</div>
<div class="header-small-text">we handle everything for the funeral<br />
business except caskets and vaults</div>
</span>
</div>

<!--top nav menu-->
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target="#example-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>
<span class="navbar-brand">Menu</span>
</div><!--end of navbar-header-->

<div class="collapse navbar-collapse" id="example-navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="products.html">Products</a></li>
<li><a href="#">About</a></li>
<li><a href="contactUs.html">Contact Us</a></li>
<li><a href="login.html">Login</a></li>
</ul>
</div>
</nav><!--end of top nav menu-->

<!--Seg:carousel-->
<div class="col-sm-10">

<div id="this-carousel-id" class="carousel slide hidden-xs"><!-- class for animation -->
<div class="carousel-inner">

<div class="item active">
<img src="images/carrousel.png" alt="" />
<div class="carousel-caption">
<p>Product 1</p>
</div>
</div>

<div class="item">
<img src="images/carrousel.png" alt="" />
<div class="carousel-caption">
<p>Product 2</p>
</div>
</div>

<div class="item">
<img src="images/carrousel.png" alt="" />
<div class="carousel-caption">
<p>Product 3</p>
</div>
</div>

<div class="item">
<img src="images/carrousel.png" alt="" />
<div class="carousel-caption">
<p>Product 4</p>
</div>
</div>
</div><!-- end of carousel-inner -->

<!--  Next and Previous controls -->
<a class="carousel-control left" href="#this-carousel-id" data-slide="prev">&lsaquo;</a>
<a class="carousel-control right" href="#this-carousel-id" data-slide="next">&rsaquo;</a>
</div><!-- end of carousel -->
</div><!--end of col-sm-10 -->
<!--End:carousel-->    

<!--Seg:content-->
<div class="row">
<div class="col-sm-3">

<!--sidebar nav menu-->
<div class="sidebar-nav">
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target=".sidebar-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>
<span class="visible-xs navbar-brand">Categories</span>
</div><!--end of navbar-header-->

<div class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="#">Acknoledgement Cards</a></li><!--class="active"-->
<li><a href="#">Air Trays</a></li>
<li><a href="#">Body Bags</a></li>
<li><a href="#">Chapel Equipment</a></li>         
<li><a href="#">Flower Handling</a></li>         
<li><a href="#">Funeral Garments</a></li>         
<li><a href="#">Jewish Service Needs</a></li>         
<li><a href="#">OSHA</a></li>         
<li><a href="#">Preparation Room</a></li>         
<li><a href="#">Rosary Beads</a></li>         
<li><a href="#">Urns</a></li>         
</ul>
</div><!--end of nav-collapse-->
</div>
</div><!--end of sidebar nav menu-->
</div><!-- end of col-sm-3 -->

<!--content-->
<div class="col-sm-9">
<div class="row">
<div class="text"><strong>Best Sellers:</strong></div>
<div class="col-xs-12">
<div class="row">
<div class="col-md-3 col-sm-6 post">

<a href="#" class="thumbnail"><img src="images/thumbnail.png" alt="" /></a>
<h2>Item</h2>
<p>Dummy Text! Dummy Text! Dummy Text! Dummy Text!  
Dummy Text! Dummy Text! </p>
<span class="btn btn-default">Details</span>
</div>

<div class="col-md-3 col-sm-6 post">
<a href="#" class="thumbnail"><img src="images/thumbnail.png" alt="" /></a>
<h2>Item 2</h2>
<p>Dummy Text! Dummy Text! Dummy Text! Dummy Text!  
Dummy Text! Dummy Text! </p>
<span class="btn btn-default">Details</span>
</div>
                    </div>
                </div><!-- end of col-xs-12-->
            </div>
        </div><!--end of col-sm-9-->
    </div> <!-- end of row-->
    <!--End:content-->



    <!--Seg:footer-->
    <footer class="row footer">
        <div class="container">
            <div class="panel-footer">
                <p>Copyright &copy; 2014<br />
                 Site design:<a href="#"> </a><br />
                 <a href="#">Return Policy</a><br />
                 <a href="#">Privacy Policy</a> 
                </p>
            </div><!--end of panel-footer-->
        </div>
    </footer>
    <!--End:footer-->

<!--Seg:closePage-->
</div><!--end of container-->
<!--End:closePage-->

</body>
</html>

0 个答案:

没有答案