Forward slash / in CSS border radius syntax

删除回忆录丶 提交于 2019-11-27 07:57:49

问题


Recently I came across following border radius syntax unknown to me:

.myClass{
    border-radius: 30% / 20%;
}

Can anyone explain the syntax. And is it compatible with IE8?


回答1:


From W3C :

If values are given before and after the slash, then the values before the slash set the horizontal radius and the values after the slash set the vertical radius. If there is no slash, then the values set both radii equally.

As far as the support goes, IE8 doesn't support border-radius property be it whatever syntax you write in. There are polyfills available like CSS3 Pie if you want to make border-radius work on IE8.

You can check on CanIUse for border-radius support across browsers.




回答2:


Basing on http://www.w3schools.com/cssref/css3_pr_border-radius.asp border-radius is not compatible with IE8 but IE9.



来源:https://stackoverflow.com/questions/29693384/forward-slash-in-css-border-radius-syntax

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