Rounded corners in Chrome not working

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 07:47:49

This is a bug with the Skia graphics library that is leveraged by Chrome. It's reproduceable in Windows and Linux...

but as of today, it's fixed and available in the dev channel! (It'll be between 4 and 10 weeks when it goes to everyone in the stable channel)

More details: http://paulirish.com/2011/chrome-inset-box-shadow-bug-fixed/

Try:

border-radius: 10px;
border-right-radius: 0;
-moz-border-radius: 10px;
-moz-border-right-radius: 0;
-webkit-border-radius: 10px;
-webkit-border-right-radius: 0;
-o-border-radius: 10px;
-o-border-right-radius: 0;

To Keep this question updated

the border-radiusproperty no longer needs to be prefixed,

 <strike>-moz-border-radius-topleft: 10px;</strike>
  <strike>-moz-border-radius-topleft: 10px;</strike>
  border-radius-topleft: 10px;
  border-radius-topleft: 10px;
  <strike>-webkit-border-top-left-radius: 20px;</strike>
  <strike>-webkit-border-top-right-radius: 20px;</strike>

And also, you were missing dashes (-) within your declaration:

So,

  border-radius-topleft: 10px;
  border-radius-topleft: 10px;

becomes:

  border-top-left-radius: 10px;
  border-top-left-radius: 10px;

DEMO:

div {
  height: 200px;
  width: 400px;
  background: tomato;
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
}
<div></div>

To reduce your CSS even further, you could declare your border radius in a single line:

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