我正在尝试制作一个下拉菜单,您必须在下拉菜单显示之前单击。但每次我加载页面时,下拉菜单也会加载。我真的试图查看我的代码,我觉得它是在代码的开头。
有人能看到这段代码有什么问题吗?
<li class="dropdown">
<a class="dropdown-toggle" data-close-others="false" data-delay="0" data-hover=
"dropdown" data-toggle="dropdown" href="#">Feature <i class="fa fa-angle-down"></i>
</a>
<!--container start-->
<div class="login-bg">
<div class="container">
<div class="form-wrapper">
<form class="form-signin wow fadeInUp" action="index.html">
<h2 class="form-signin-heading">sign in now</h2>
<div class="login-wrap">
<input type="text" class="form-control" placeholder="User ID" autofocus>
<input type="password" class="form-control" placeholder="Password">
<label class="checkbox">
<input type="checkbox" value="remember-me"> Remember me
<span class="pull-right">
<a data-toggle="modal" href="#myModal"> Forgot Password?</a>
</span>
</label>
<button class="btn btn-lg btn-login btn-block" type="submit">Sign in</button>
<p>or you can sign in via social network</p>
<div class="login-social-link">
<a href="index.html" class="facebook">
<i class="fa fa-facebook"></i>
Facebook
</a>
<a href="index.html" class="twitter">
<i class="fa fa-twitter"></i>
Twitter
</a>
</div>
<div class="registration">
Don't have an account yet?
<a class="" href="registration.html">
Create an account
</a>
</div>
</div>
<!-- Modal -->
<div aria-hidden="true" aria-labelledby="myModal" role="dialog" tabindex="-1" id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Forgot Password ?</h4>
</div>
<div class="modal-body">
<p>Enter your e-mail address below to reset your password.</p>
<input type="text" name="email" placeholder="Email" autocomplete="off" class="form-control placeholder-no-fix">
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-default" type="button">Cancel</button>
<button class="btn btn-success" type="button">Submit</button>
</div>
</div>
</div>
</div>
<!-- modal -->
</form>
</div>
</div>
</div>
<!--container end-->
</li>
<!-- /li dropdown for login -->
</ul>
<!-- /ul for navigationbar -->
</div>
</div>
</header>
<!--header end-->
答案 0 :(得分:0)
以下是bootstrap中的标准代码,您可以将其用于下拉列表。
def Shipping(object):
def __init__(self, row):
self.name = row[0]
self.title = row[1]
self.address = row[2]
def action(self):
return "Sending %s to %s at %s" % (self.book, self.user, self.address)
希望它可以帮助您解决问题。
如果您仍有疑问,请发布正确的HTML或创建fiddle / bootply snippet here