运行自定义引导程序登录模式(请参阅here)时,在我的网站中启动时会显示背景淡入淡出但模态本身不显示。这在GitHub pages中使用时有效。我在这里找到的唯一解决方案是告诉我在浏览器中检查开发人员控制台是否存在错误,并且没有发生任何事情。这是我使用的编码:
poll
编辑:我想注意,我正在<!--Buttons-->
<li data-toggle="modal" data-target="#signupModal"><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li data-toggle="modal" data-target="#loginmodal"><a href="#">Log In</a></li>
<!--Modals-->
<!--Start signup modal-->
<div class="modal fade" id="signupModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Sign Up</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="username">Username:</label>
<input type="text" class="form-control" id="username" placeholder="Enter a username"
</div><br>
<div class="form-group">
<label for="confirmUsername">Confirm Username:</label>
<input type="text" class="form-control" id="confirmUsername" placeholder="Confirm username">
</div>
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email" placeholder="Enter your email address">
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" class="form-control" id="password" placeholder="Enter a password">
</div>
<div class="form-group">
<label for="confirmPassword">Confirm password:</label>
<input type="password" class="form-control" id="confirmPassword" placeholder="Confirm password">
</div>
<button type="button" class="btn btn-info">Sign Up</button>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
<!--End Signup Modal-->
<!--Start login modal-->
<div class="modal fade" id="loginmodal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Log In</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="username">Username:</label>
<input type="text" class="form-control" id="username" placeholder="Enter username">
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" class="form-control" id="password" placeholder="Enter password">
</div>
<button type="button" class="btn btn-info">Log In</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!--End Login Modal-->
中运行JQuery和Javascript。我不想显示所有代码,因为这是一个私人项目,所以我只是展示了这么多。