-webkit-border-radius:10px;无法在 Safari 中工作

发布于 2025-01-04 16:16:36 字数 382 浏览 3 评论 0原文

-webkit-border-radius:10px; 

不在 Safari 中工作。我已经在所有浏览器中使用了 css,如下所示:

.nav {border:1px solid #e5e5e5;width:100px;height:32px;-moz-border-radius: 8px 8px 0px 0px;-webkit-border-radius: 8px 8px 0px 0px;-khtml-border-radius: 8px 8px 0px 0px;behavior:url(../images/PIE.htc);border-radius: 8px 8px 0px 0px;}

有人可以帮助我吗? 谢谢 小吃

-webkit-border-radius:10px; 

is not working in safari. I have used css for all browsers like this:

.nav {border:1px solid #e5e5e5;width:100px;height:32px;-moz-border-radius: 8px 8px 0px 0px;-webkit-border-radius: 8px 8px 0px 0px;-khtml-border-radius: 8px 8px 0px 0px;behavior:url(../images/PIE.htc);border-radius: 8px 8px 0px 0px;}

Anybody can help me?
Thanks
Tapas

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

灼痛 2025-01-11 16:16:36

您确定您使用的 Safari 版本支持边框半径值的简写 CSS3 吗?尝试使用设置它们

-webkit-border-top-left-radius 
-webkit-border-top-right-radius 
-webkit-border-bottom-left-radius 
-webkit-border-bottom-right-radius 

或者您可以查看使用 http://leaverou.github.com/prefixfree/ 这将消除您指定多个浏览器前缀的需要。

Are you sure that the version of Safari that you are using supports shorthand CSS3 for border radius values? Try setting them with

-webkit-border-top-left-radius 
-webkit-border-top-right-radius 
-webkit-border-bottom-left-radius 
-webkit-border-bottom-right-radius 

Alternatively you can have a look at using http://leaverou.github.com/prefixfree/ and this will eliminate your need to specify multiple browser prefixes.

夏末染殇 2025-01-11 16:16:36

Safari 4.0.4(可能还有其他一些)有一个错误,不喜欢 border-radius 简写。请参阅 CSS Wizardry 的这篇文章。您必须使用普通标记来定义 webkit 版本:

-webkit-border-radius: 8px;
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-moz-border-radius:8px 8px 0 0;
border-radius:8px 8px 0 0;

正如 Dan 的回答中所建议的。

There is a bug with Safari 4.0.4 (and probably some others) that doesn't like border-radius shorthand. See this post from CSS Wizardry. You will have to define the webkit versions with the longhand markup:

-webkit-border-radius: 8px;
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-moz-border-radius:8px 8px 0 0;
border-radius:8px 8px 0 0;

As suggested in Dan's answer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文