【发布时间】:2012-01-01 03:05:10
【问题描述】:
当父 div 应用了 css 阴影,并使用 jQuery 对其子 div 进行动画处理以使父 div 改变高度时,在 IE9 中查看页面时,父 div 下方会出现奇怪的线条。这是一个示例:http://jsfiddle.net/vPqxb/11/ 和屏幕截图:
对于只想看代码的人;这是 HTML:
<div class="parent">
<div class="longer"> </div>
</div>
,CSS:
div.parent {
background: #ddd;
box-shadow: 1px 1px 2px 1px #c9c7c9;
width: 80%;
}
div div {
background: red;
height: 10px;
width: 30px;
}
.longer {
height: 200px;
}
和 JavaScript(注意第一个需要 jQuery UI):
$("a.toggleclass").on("click", function() { //some trigger, doesn't matter where
div.stop(true,true).toggleClass("longer", 1000);
});
$("a.animate").on("click", function() { //another one without jQuery UI
div.stop(true,true).animate({"height":"20px"}, function() {
div.attr({"style":""});
});
});
我的问题是;
- 这是 jQuery 还是 Internet Explorer 错误?
- 你能找到解决办法吗? (Internet Explorer 9 不支持转换,所以我一无所知)
非常感谢您的帮助。
【问题讨论】:
-
我在这里stackoverflow.com/questions/8675773/… 也问过类似的问题,想知道您是否找到了任何解决方法
标签: jquery jquery-ui css internet-explorer-9 jquery-animate