Modernizr How to do border-radius

假装没事ソ 提交于 2019-12-04 11:02:16

Modernizr gives you mostly ways to test for HTML5 support, and then load in shims for what you're missing so that you can code to one, modern standard. It doesn't update the browser's native behaviors. So for CSS, while it detects whether or not your browser supports border radius, it doesn't figure out a way to emulate that support.

It would however allow you to decide to load in something to support them like css3 pie.

Modernizr lets you detect if a particular feature (say border-radius) is supported in the browser. If it is not supported, you can use Modernizr.load() to load a polyfill that mimics the functionality on that browser. This allows the modern browsers to use their built-in features (which will be faster) and lets you load the polyfill only on the browsers that need it.

More info on Modernizr.load : http://www.modernizr.com/docs/#load

Useful list of polyfills : https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!