html5 – 如何检测浏览器中的HTML 5兼容性

前端之家收集整理的这篇文章主要介绍了html5 – 如何检测浏览器中的HTML 5兼容性前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
检测HTML 5语法的浏览器兼容性的最佳方式是什么?并提示用户浏览器是否不兼容?

我明白了the tutorial which shows how to test browser compatibility for HTML5.但是我很好奇,知道这是唯一的办法吗?我需要检查每一个元素吗?

解决方法

看看 Modernizr

Taking advantage of the new capabilities of HTML5 and CSS3 can mean
sacrificing control over the experience in older browsers. Modernizr 2
is your starting point for making the best websites and applications
that work exactly right no matter what browser or device your visitors
use.

Thanks to the new Media Query tests and built-in YepNope.js
micro-library as Modernizr.load(),you can now combine feature
detection with media queries and conditional resource loading. That
gives you the power and flexibility to optimize for every
circumstance.

它有很多内置的方法来测试浏览器功能,并提供了一种有用的方式来提供回退代码,以便在不支持要使用的功能时。

更多信息:http://www.modernizr.com/

原文链接:https://www.f2er.com/html5/169055.html

猜你在找的HTML5相关文章