简体   繁体   English

CSS圆角在Safari / Opera中不起作用

[英]CSS Rounded Corners Not Working in Safari/Opera

I am new at CSS but am trying to learn front-end coding. 我是CSS的新手,但是正在尝试学习前端编码。 I've searched a lot of different sites including this one to try and find why my rounded corners aren't working in Safari or Opera. 我搜索了许多不同的站点,包括该站点,以尝试找出为什么我的圆角无法在Safari或Opera中工作。 My code already included most of what was suggested, and other's didn't seem to apply to my situation. 我的代码已经包含了大部分建议,其他代码似乎不适用于我的情况。 I'm on a Mac (10.6.8). 我使用的是Mac(10.6.8)。 Works fine in Mozilla, IE9 & Chrome. 在Mozilla,IE9和Chrome中可以正常运行。 It's a conatiner DIV that holds a swf. 这是一个拥有SWF的补充DIV。 Here is the code: 这是代码:

#container {
  height: 600px;
  width: 955px;
  margin-top: 16px;
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
  border-bottom-right-radius: 18px;
  border-top-left-radius: 18px;
  -webkit-border-bottom-right-radius: 18px;
  -webkit-border-top-left-radius: 18px;
  -o-border-bottom-right-radius: 18px;
  -o-border-top-left-radius: 18px;
  -moz-border-radius-bottomright: 18px;
  -moz-border-radius-topleft: 18px;
}

Here's a link to my site: www.mentalwarddesign.net 这是我站点的链接:www.mentalwarddesign.net

I've also tried (for the heck of it) indicating "0" values on the 2 corners I don't want affected. 我也尝试过(对于它的麻烦)在我不想影响的2个角上指示“ 0”值。 In addition I've tried "border-radius: 18px" to simply round all corners. 另外,我尝试了“边界半径:18px”来简单地四舍五入。 Both with the same effect of working in all but Safari & Opera (well, IE 6-8 too of course). 除了Safari和Opera以外,两者都具有相同的工作效果(当然,IE 6-8也是如此)。 It must be something simple. 它一定很简单。 If I've missed this question answered here before, please forgive me and point me in the right direction. 如果我错过了之前在这里回答过的问题,请原谅我并指出正确的方向。 The closest post I found here was this one: CSS rounded corners bug in Safari? 我在这里找到的最近的帖子是: Safari中的CSS圆角错误? but I didn't find anything helpful there. 但我发现那里没有任何帮助。

Here you can find working version with code... 在这里您可以找到带有代码的工作版本...

http://www.css3maker.com/ http://www.css3maker.com/

http://css3please.com/ http://css3please.com/

Looks like it's actually a case of the flash player not complying with overflow: hidden . 看起来这实际上是Flash Player不符合overflow: hidden Presumably, it works with text in place of the swf? 大概可以用文本代替swf吗?

IIRC, you have to add a wmode <param /> to the swf: IIRC,您必须在swf中添加wmode <param />

<param name="wmode" value="transparent">

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

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