jQuery plugin for cross browser css compatibility

孤人 提交于 2019-12-13 05:36:57

问题


In my app users will be able to change element's border style attributes like radius, color, width, style etc.

Now I also need to be able to get these attributes with jQuery, however in order to get something like border-radius, you need to use css("border-top-left-radius") (at least in new versions of firefox and chrome) and this will not work in all browsers, so my question is:

Is there a plugin that adds correct prefix to the css selector like webkit, moz etc. and maybe also makes these css features cross-browser compatible when setting these attributes?

Many thanks.


回答1:


-prefix-free by Lea Verou offers a jQuery plugin that simply integrates the -prefix-free script itself with jQuery's .css() method.

All the script itself does is add vendor prefixes to CSS properties where appropriate so you don't have to. It doesn't do anything else like polyfills.



来源:https://stackoverflow.com/questions/9142690/jquery-plugin-for-cross-browser-css-compatibility

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