gpt4 book ai didi

jquery - Internet Explorer 9+ 框阴影和 jQuery hide()

转载 作者:行者123 更新时间:2023-11-28 18:25:55 25 4
gpt4 key购买 nike

我在 Internet Explorer 9+ 中有一个奇怪的错误,例如带有框阴影的可隐藏标签:

CSS

label {
box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
}

jQuery

$('label').click(function() {
$(this).hide();
});

关于 jsFidle 的更完整示例 here

对于没有 Internet Explorer 的用户,这是结果 (2):

enter image description here

所以问题是:如果您单击通知将其隐藏,阴影将保留在 Internet Explorer 9 和 10 上。

有什么线索吗?

最佳答案

作为@adeneo在评论中说,问题是 IE 如何处理 display:inline 元素上的 box-shadow

解决方案是将元素设置为inline-block,但请注意,这会改变元素的定位。

关于jquery - Internet Explorer 9+ 框阴影和 jQuery hide(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15774072/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com