Modernizr How to make a border radius

Could you tell me a little about Modernizr .

If I use a function (say border-radius ) and I run it using an older browser. Will the modernizer automatically add css to the page OR should I write code to render the control as having borders. If the second case is true, then WHY should I use Modernizr?

+4
source share
2 answers

Modernizr gives you basically ways to test HTML5 support, and then loads into the pads what you are missing so you can code one, modern standard. It does not update browser-based behavior. Therefore, for CSS, when it determines whether your browser supports border radius, it does not determine how to emulate this support.

However, you might decide to download something to support them, such as css3 pie .

+9
source

Modernizr allows you to detect if a specific function (for example, the radius of the border) is supported in the browser. If it is not supported, you can use Modernizr.load () to load a polyfill that mimics the functionality of this browser. This allows modern browsers to use their built-in functions (which will be faster) and allows you to download polyfill only in the desired browsers.

Additional information about Modernizr.load: http://www.modernizr.com/docs/#load

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

+6
source

Source: https://habr.com/ru/post/1380708/


All Articles