ngAnimate 仅在 IE9 中部分降级
ngAnimate only degrades partially in IE9
我修改了 this tutorial 中的代码,它使滑动 div
具有动画效果,因此它可以用作切换菜单。我希望它会在 IE9 中退化为正常的隐藏显示。它是什么。但只有一次。如果我单击第一个按钮,它将打开和关闭其 div。它适用于所有四个这样的。但是在第一次切换之后,IE 无法再次显示 div
s。我可以通过记录单击按钮的索引来验证 ng-click
是否正常工作。但出于某种原因,display
属性 似乎未设置为 block
。是否存在 ngAnimate 导致 IE9 无错误中断的已知问题,或者我错过了一些明显的问题?
据我所知 css IE9 及更早版本不支持转换。因此,如果您想支持这些浏览器,您可以改用 jQuery 动画。
希望这会有所帮助。
In angularjs site 你会发现:
Although most modern browsers have good support for CSS transitions
and CSS animations, IE9 and earlier do not. If you want animations
that are backwards-compatible with older browsers, consider using
JavaScript-based animations, which are described in detail below.
实用:如果您删除此行:transition: all 0.8s;
您将看到所有浏览器的行为方式相同。
解决方案:
Internet Explorer 9 是最后一个不支持过渡 属性 或动画的 IE 浏览器 here,但支持条件注释,因此您可以放置回退代码进入仅适用于 IE9 的条件注释,并将其作为您的解决方案提供给所有 IE9(及以下)用户。
<!--[if lte IE 9]>
<script src="animation-legacy-support.js"></script>
<![endif]-->
或者您可以像这样使用 modernizr 库:
if(!Modernizr.csstransitions) { // if not supported.
//ADD YOUR javascirpt-based CODE HERE
}
或者你可以用 jquery 制作所有动画,如你所见,对 ie9+ 使用 jquery 2.x 或对 ie6+ 使用 jquery 1.x here.
注意:angular 和 jquery 动画示例可以在 angularjs 站点底部的 Animating ngClass with JavaScript 章节中找到。
我修改了 this tutorial 中的代码,它使滑动 div
具有动画效果,因此它可以用作切换菜单。我希望它会在 IE9 中退化为正常的隐藏显示。它是什么。但只有一次。如果我单击第一个按钮,它将打开和关闭其 div。它适用于所有四个这样的。但是在第一次切换之后,IE 无法再次显示 div
s。我可以通过记录单击按钮的索引来验证 ng-click
是否正常工作。但出于某种原因,display
属性 似乎未设置为 block
。是否存在 ngAnimate 导致 IE9 无错误中断的已知问题,或者我错过了一些明显的问题?
据我所知 css IE9 及更早版本不支持转换。因此,如果您想支持这些浏览器,您可以改用 jQuery 动画。
希望这会有所帮助。
In angularjs site 你会发现:
Although most modern browsers have good support for CSS transitions and CSS animations, IE9 and earlier do not. If you want animations that are backwards-compatible with older browsers, consider using JavaScript-based animations, which are described in detail below.
实用:如果您删除此行:transition: all 0.8s;
您将看到所有浏览器的行为方式相同。
解决方案:
Internet Explorer 9 是最后一个不支持过渡 属性 或动画的 IE 浏览器 here,但支持条件注释,因此您可以放置回退代码进入仅适用于 IE9 的条件注释,并将其作为您的解决方案提供给所有 IE9(及以下)用户。
<!--[if lte IE 9]>
<script src="animation-legacy-support.js"></script>
<![endif]-->
或者您可以像这样使用 modernizr 库:
if(!Modernizr.csstransitions) { // if not supported.
//ADD YOUR javascirpt-based CODE HERE
}
或者你可以用 jquery 制作所有动画,如你所见,对 ie9+ 使用 jquery 2.x 或对 ie6+ 使用 jquery 1.x here.
注意:angular 和 jquery 动画示例可以在 angularjs 站点底部的 Animating ngClass with JavaScript 章节中找到。