我有一个 Bootstrap 弹出登录页面,它在 google chrome 上工作正常,但在 IE10 上不行。 我的意思是问题是当您单击关闭按钮时,它应该通过移动页面顶部来隐藏。它适用于 google chrome 但 IE10,不走运
这是源代码html和脚本
<meta http-equiv="X-UA-Compatible" content="IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
<link href="http://www.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css"
rel="stylesheet">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://jquery.bassistance.de/validate/jquery.validate.js"></script>
<link href="../css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script src="http://www.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
html 端
<div id="form-content" class="modal hide fade in" style="display: none; margin-top: 140px;">
<form id="form">
<div class="form-group">
<label class="control-label" for="username">
User Name:</label>
<div class="input-group">
<input class="form-control" type="text" id="txtUsername" name="username">*
</div>
</div>
<div class="form-group">
<label class="control-label" for="password">
Password:</label>
<div class="input-group">
<input class="form-control" type="text" id="txtPassword" name="password">*
</div>
<span id="spanErrorMessage" style="color: Red; display: none;">Invalid username or password.</span>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="submit" id="btnLogin">
Sign Up</button>
<a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
</form>
<div id="dialog" title="Message" style="z-index: 9999;">
</div>
</div>
感谢任何帮助。
谢谢..
最佳答案
IE 10 上的 Bootstrap Modal 存在一个已知问题:See Here
如果您从模态元素中删除“淡入淡出”类,它应该可以工作。
更新
您可以尝试使用 jQuery 执行此操作,这样它只会影响 Internet Explorer:
$(document).ready(function(){
if ($.browser.msie && parseInt($.browser.version, 10) > 8) {
$("#form-content").removeClass(".fade");
}
});
关于javascript - IE10 上的 Bootstrap 兼容性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23562967/