【发布时间】:2013-05-03 23:26:57
【问题描述】:
我只是坚持使用 IE 8 在 jQuery 中进行 RGBA() 操作
到目前为止,我有这个:
$('.set').click(function (e) {
var hiddenSection = $('div.hidden');
hiddenSection.fadeIn()
.css({ 'display': 'block' })
.css({ width: $(window).width() + 'px', height: $(window).height() + 'px' })
.css({ top: ($(window).height() - hiddenSection.height()) / 2 + 'px',
left: ($(window).width() - hiddenSection.width()) / 2 + 'px'
})
.css({ 'background-color': 'rgba(0,0,0,0.5)' }) //Problem here in IE8
.appendTo('body');
$('span.close').click(function () { $(hiddenSection).fadeOut(); });
});
它适用于所有其他浏览器,不知道为什么它在 IE 8 中失败 我收到了这个错误!
Invalid property value 在 jquery.min.js 中。
非常感谢任何帮助!
谢谢
【问题讨论】:
-
RGBA 不能在 IE8 中工作,因为它是 CSS 的新手。您可以使用稍微透明的 PNG24,它可以在 IE8 中使用
-
对于未来:caniuse.com 在这方面真的很有帮助。
标签: jquery css internet-explorer