简体   繁体   English

有没有一种方法可以检测浏览器是否支持CSS3动画?

[英]Is there a way to detect whether the browser supports CSS3 animations or not?

I'm working on the task of web animations using CSS3, my reference is from http://tympanus.net/codrops/2011/12/07/splash-and-coming-soon-page-effects-with-css3/ , but there is a problem, not all browsers support CSS3 animations, is there a way to know the browser support or not support CSS3 animations?I want to detect it using Javascript/jQuery, PHP, or CSS itself. 我正在使用CSS3处理网络动画的任务,我的参考资料来自http://tympanus.net/codrops/2011/12/07/splash-and-coming-soon-page-effects-with-css3/ ,但是有一个问题,不是所有的浏览器都支持CSS3动画,有没有办法知道浏览器是否支持CSS3动画?我想使用Javascript / jQuery,PHP或CSS本身进行检测。 Please help. 请帮忙。 Thank you. 谢谢。

使用Modernizr ,它将CSS类添加到HTML,使您可以判断特定功能是否可用。

Found a short JS approach here. 在这里找到了一个简短的JS方法。

Detecting_CSS_animation_support Detection_CSS_animation_support

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM