1

大家好,我希望有人可以帮助我解决这个问题。

我正在使用 CSS3Pie 在盒子上获得圆角,并且在包括 IE7 在内的所有浏览器中一切正常。但是,当您将动画(这次slideToggle)添加到我的框内的元素时,IE7 开始表现得就像您没有但时一样position:relative。元素变得很大,5000px x 10000px +++。我确信所有元素position:relative在需要时都有。

我以前见过这个错误,我们找到了一个解决方法,其中包括之前对 CSS3Pie 文件的一些 JS 修复,但我再也找不到它了。

我很感谢我能得到的所有帮助。

谢谢吉米

您可以在下图中看到,灰色背景并没有在框结束的地方结束,它只是延续到网站上的其他元素之上。

您可以在下图中看到,灰色背景并没有在框结束的地方结束,它只是延续到网站上的其他元素之上。

这是向下滑动的元素的 css

#grades .form-content {
    margin:0 10px;
    padding:10px;
    width:93.8%;
    background:#fff;
}

这是盒子的CSS:

.m-pc {position:relative;}

.m-pc .m-c {
    position:relative;
    padding:38px 21px 10px;
    margin-bottom:25px;
    border:1px solid #cbcbcb;
    border-top:none;
    -moz-box-shadow:0 1px 5px #e3e4e3; /* FF3.5+ */
    -webkit-box-shadow:0 1px 5px #e3e4e3; /* Saf3.0+, Chrome */
    box-shadow:0 1px 5px #e3e4e3; /* Opera 10.5, IE 9.0 */
    background:#f6f6f6;
    behavior:url(/css/vendor/pie.htc);
}

.m-pc .m-h {
    position:relative;
    border:1px solid #cbcbcb;
    -webkit-border-radius:6px 6px 0 0;
    -moz-border-radius:6px 6px 0 0;
    border-radius:6px 6px 0 0;
    background:#eee;
    background:-webkit-gradient(linear, 0 0, 0 bottom, from(#eee), to(#e5e5e5));
    background:-webkit-linear-gradient(#eee, #e5e5e5);
    background:-moz-linear-gradient(#eee, #e5e5e5);
    background:-ms-linear-gradient(#eee, #e5e5e5);
    background:-o-linear-gradient(#eee, #e5e5e5);
    background:linear-gradient(#eee, #e5e5e5);
    -pie-background:linear-gradient(#eee, #e5e5e5);
    behavior:url(/css/vendor/pie.htc);
}
4

2 回答 2

0

我现在找不到该帖子,但另一位海报的帮助为我解决了类似的问题。向动画添加回调以重新计算位置:

 $('.your_div').animate(function () {
            if ($.browser.msie) {
                $(this).each(function () { $(this).resize(); });
            }
        });
于 2013-08-08T00:15:01.100 回答
0

动画开始时可能是双边距问题,您可以发布动画样式吗?

#grades .form-content {
    margin:0 10px;
    *margin:0 5px;
    *zoom:1;
    padding:10px;
    *padding:5px;
    width:93.8%;
    background:#fff;
}

问题似乎来自动画样式本身,或者您只是使用slideToggle?

.animate({
    'left/right/top/bottom' : ?
});
于 2012-01-17T09:43:45.933 回答