[英]Twitter bootstrap modal backdrop not working in IE
I've got a modal that i include via jQuery such as: 我有一个通过jQuery包含的模式,例如:
var vCheckModal =
"<div id='myModal' class='custom-modal modal hide fade'>"
+ "<div class='modal-header'><button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button></div>"
+ "<div class='modal-body'><p>Please Upgrade</p></div>"
+ "<div class='modal-footer'><button class='btn' data-dismiss='modal'>Close</button></div>"
+ "</div>";
It then fires upon a browser check: 然后在浏览器检查时触发:
if (BrowserDetect.browser == "Explorer"){ //If browser is IE
if (BrowserDetect.version < 10){ //purely for testing
console.log("less than 10");
$('body').append(vCheckModal);
$('#myModal').modal({
backdrop: true,
backdrop: 'static',
show: true
})
}
}
Works fine when I've changed the modal to appear in Firefox and chrome. 当我将模式更改为出现在Firefox和chrome中时,效果很好。 But in IE 8,9,10 i see not greyed out background.
但是在IE 8,9,10中,我看不到背景为灰色。 Yet if i visit the twitter bootstrap demo site, i can see the modal's greyed background fine.
但是,如果我访问twitter bootstrap演示站点,则可以看到该模式的灰色背景很好。 Although i think this is initialized differently.
虽然我认为这是不同的初始化。 Can anyone point me in the right direction as to why this is happening?
谁能指出我为什么的正确方向?
Boostrap v: 2.3.2 Boostrap v:2.3.2
Currently using this detection script 当前正在使用此检测脚本
While making a jsFiddle, i traced the problem to the bootstrap CSS file i was using. 在制作jsFiddle时,我将问题追溯到我正在使用的bootstrap CSS文件中。 I am not sure how but it was missing some CSS.
我不确定如何,但是它缺少一些CSS。 I changed to the correct version, and it's now working fine in IE.
我更改为正确的版本,现在在IE中可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.