我正在使用 bootstrap 2.2版对导航条没有响应请帮助我,我应该如何处理移动视图这里是我的HTML
<nav class="navbar">
<div class="navbar-inner is-sticky">
<div class="main-nav">
<!-- Nav Menu -->
<ul class="nav nav-tabs">
<li><a href="Index.aspx" type="text/html">Home</a></li>
<li class="dropdown">
<a data-toggle="dropdown"
href="#">Our Products
<b class="caret"></b>
</a>
<%
string tagc = "";
using (MarhabaWebApplication.model.marhaba_web_dbEntities db = new MarhabaWebApplication.model.marhaba_web_dbEntities())
{
tagc += "<ul class=\"dropdown-menu\">";
var cat = (from pc in db.tbl_product_category select pc).ToList();
for (int i = 0; i < cat.Count; i++)
{
tagc += "<li onclick=navigatetocatpage(" + cat[i].p_c_id + ")>"+cat[i].p_c_name+"</li>";
}
tagc += "</ul>";
}
Response.Write(tagc);
%>
</li>
<li><a href="index.html#about">about us</a></li>
<li><a href="index.html#portfolio">portfolio</a></li>
<li><a href="index.html#contact">contact</a></li>
<li><a href="blog/index.html">Blog</a></li>
</ul>
</div>
<!-- Nav Menu end-->
</div>
</nav>
我们的产品选项卡正在创建动态忽略那个工作正常的代码,只需告诉我应该如何做好响应,谢谢! bootstrap also telling something about navbar responsiveness
答案 0 :(得分:1)
<nav class="navbar">
<div class="navbar-inner is-sticky">
<div class="main-nav">
<!-- Nav Menu -->
<a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse collapse navbar-responsive-collapse">
<ul class="nav">
<li><a href="Index.aspx" type="text/html">Home</a></li>
<li class="dropdown">
<a data-toggle="dropdown"
href="#">Our Products
<b class="caret"></b>
</a>
<%
string tagc = "";
using (MarhabaWebApplication.model.marhaba_web_dbEntities db = new MarhabaWebApplication.model.marhaba_web_dbEntities())
{
tagc += "<ul class=\"dropdown-menu\">";
var cat = (from pc in db.tbl_product_category select pc).ToList();
for (int i = 0; i < cat.Count; i++)
{
tagc += "<li onclick=navigatetocatpage(" + cat[i].p_c_id + ")>"+cat[i].p_c_name+"</li>";
}
tagc += "</ul>";
}
Response.Write(tagc);
%>
</li>
<li><a href="index.html#about">about us</a></li>
<li><a href="index.html#portfolio">portfolio</a></li>
<li><a href="index.html#contact">contact</a></li>
<li><a href="blog/index.html">Blog</a></li>
</ul>
</div>
</div>
<!-- Nav Menu end-->
</div>
</nav>
&#13;