简体   繁体   English

Android浏览器不支持具有百分比值的边界半径

[英]Border-radius with percentage value not supported in Android Browsers

Is there a known issue using % values in border radius on Android browsers? 在Android浏览器上使用边界半径中的%值是否存在已知问题?

I notice that when I use: 我注意到当我使用时:

.element {
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
}

The border radius seems to work on all mobile browsers, but when I use: 边框半径似乎适用于所有移动浏览器,但是当我使用时:

.element {
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
}

The border radius does not apply on Android browsers. 边框半径不适用于Android浏览器。

Yes there is: check here, and click on known issues. 是的有: 点击此处,然后点击已知问题。

Here's what it says: 这就是它所说的:

1. Android Browser 2.3 does not support % value for border-radius.

2. Border-radius does not work on fieldset elements in IE9.

3. The stock browser on the Samsung Galaxy S4 with Android 4.2 does not support the "border-radius" shorthand property but does support the long-hand properties for each corner like "border-top-left-radius".

What are you using the percentage value for? 你用什么百分比值? Please tell us, so we can further help you. 请告诉我们,我们可以为您提供进一步的帮助。

Now, since you are using it to make circles, there's a dirty hack you can use: 现在,既然你用它来制作圈子,那么你可以使用一个肮脏的黑客:

#circle {
  border-radius: 9999px; /* makes it a circle */
}

That should work fine. 这应该工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM