我正在尝试使用bootstrap为网页构建响应式布局。我想通过标题,左侧导航在大型显示器[桌面分辨率]上正常呈现网页。但是如果网站的大小调整为平板电脑或移动设备[OffCanvas Bootstrap],我想显示切换按钮。以下是我迄今取得的成就......
JsFiddle:http://jsfiddle.net/BqKNV/222/
现在,我遇到了幻灯片动画和左侧导航可见性[始终隐藏]的问题。如果有人能够发现我出错的地方将会受到赞赏..谢谢
<section class="offcanvas-layout">
<aside id="aside-menu" class="offcanvas-left nav-collapse collapse">
<div id="leftcontent">
<div class="inner">
<div></div>
</div>
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<!-- Collect the nav links, forms, and other content for toggling -->
<ul class="nav nav-pills nav-stacked">
<li> <a href="#"><span class="glyphicon glyphicon-play"></span>United States</a>
</li>
<li> <a href="#"><span class="glyphicon glyphicon-play"></span>Canada</a>
</li>
</ul>
</div>
<!-- /.container-fluid -->
</div>
</aside>
<article class="offcanvas-content">
<div id="header">
<div class="container">
<button class="btn navbar-btn" data-toggle="collapse" data-target="#aside-menu">Click Me</button> <a id="logo">Logo here</a>
<div class="dropdown pull-right"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a>
</li>
<li><a href="#">Another action</a>
</li>
<li><a href="#">Something else here</a>
</li>
<li class="divider"></li>
<li><a href="#">Separated link</a>
</li>
</ul>
</div>
<div class="searchBox">
<div class="input-group input-group-sm">
<input id="header-search" type="text" class="form-control" placeholder="search..." /> <span class="input-group-btn">
<button class="btn btn-default" type="button" id="search_Button"><span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
</div>
</div>
</div>
<div id="maincontent">
<div id="maincontentnav">
<p>Main Content Here</p>
</div>
</div>
</article>
</section>
答案 0 :(得分:0)
您可以像这样使用visible-xs
响应式实用程序类...
<button class="btn navbar-btn visible-xs" data-toggle="collapse" data-target="#aside-menu">Click Me</button> <a id="logo">Logo here</a>