What CSS3 features still need vendor prefixes?

冷暖自知 提交于 2019-12-04 03:44:33

问题


The most common features I remember needing prefixes for were features such as flexbox, border-radius, box-shadow, etc... but now they are supported. With more users switching to more powerful browsers like Chrome and Firefox and away from IE, are there still features now that haven't been fully supported and require prefixes?


回答1:


There is a great site which allows you to check out support of any css property by most modern browsers. It also shows info about vendor prefixes (if they are needed). This site is named "Can I use" - http://caniuse.com




回答2:


Use the site http://shouldiprefix.com. It has the single purpose to "show what prefixes are needed for a newer CSS property."

Just enter the property you're interested in the search field, and it will return something like the below graphic:




回答3:


Browser vendors are getting better at supporting features. That said, some newer or experimental features will require a prefix; but trying to remember or memorize them seems impractical.

You can check if your CSS needs any vendor prefixes by using tools like Autoprefixer CSS online. This tool generates prefixes based on the information provided from canIuse.

If you're using build tools for your project, check out:

  • gulp-autoprefixer
  • grunt-postcss



回答4:


"...are there still features now that haven't been fully supported and require prefixes?"

Yes, and there will always be, as it's kind of an industry standard that vendors use their prefix on newly drafted properties/methods until those become a standard.

I recommend you check the ones you are going to use, instead of searching for the ones that still has.

MDN provides an excellent site with both status, explanations, samples and browser support.



来源:https://stackoverflow.com/questions/42445951/what-css3-features-still-need-vendor-prefixes

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