在现代浏览器中创建边框半径时,是否仍需要指定所有三个“border-radius”、“-moz-border-radius”和“-webkit-border-radius”?

Do I still need to specify all three `border-radius`, `-moz-border-radius` and `-webkit-border-radius` when creating border radius in modern browsers?

我正在创建一个使用边框半径的网站。我发现很多教程都展示了这个例子:

-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;

此示例表明我必须为所有三个浏览器引擎指定边框半径。

看来此信息只是被复制了。这在 2015 年 8 月的今天仍然如此吗?我必须这样做还是这只是过时的信息?

简答:

现代浏览器支持这些属性!

只需使用:border-radius: 10px

Compatibility Table

对于所有现代浏览器,您只需要使用 border-radius

根据

http://caniuse.com/#search=border-radius

https://css-tricks.com/do-we-need-box-shadow-prefixes/

不,你不需要。查看 w3scools 参考资料:http://www.w3schools.com/cssref/css3_pr_border-radius.asp