box-shadow 在 Safari 5 中不起作用
在此代码中,
box-shadow: 0 6px 0 #000000, 0 10px 0 #1578B1;
此代码
0 10px 0 #1578B1;
不适用于 Safari 5.0.5 (Windows)
任何解决方案
In This code
box-shadow: 0 6px 0 #000000, 0 10px 0 #1578B1;
this
0 10px 0 #1578B1;
Not working in Safari 5.0.5 (Windows)
Any solution
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的代码可以在我运行的 Chrome 版本中运行,所以我大胆猜测它与你的 Safari 版本有关(顺便说一句,它有点旧)。
我建议在
box-shadow: 0 6px 0 #000000, 0 10px 0 #1578B1; 之后添加
看看会发生什么。 (最佳实践实际上规定供应商特定代码应该位于标准代码之前,但您的 Safari 版本实际上似乎行为不当,因为如果它不理解整个内容,它就不会像应有的那样忽略整行代码。)-webkit-box-shadow: 0 6px 0 #000000, 0 10px 0 #1578B1;
如果这仍然不起作用,请将第二种颜色改为明显更浅的颜色。有可能正在工作,但您的显示器显示的蓝色太暗,您无法辨别差异。
我制作了一个用于测试的小提琴 - http://jsfiddle.net/E28CM/1/ 。如您所见,我没有更改您的 box-shadow 代码,并且该代码可以在我拥有的浏览器中运行。
Your code works in the version of Chrome I'm running, so I'd venture to guess it has to do with your version of Safari (which is a little old, by the way).
I recommend adding
-webkit-box-shadow: 0 6px 0 #000000, 0 10px 0 #1578B1;
after yourbox-shadow: 0 6px 0 #000000, 0 10px 0 #1578B1;
and see what happens. (Best practice actually dictates that the vendor specific code should be before the standard code, but your version of Safari actually appears to be be misbehaving, because it's not ignoring the whole line like it should if it doesn't understand the whole thing.)If that still doesn't work, turn that second color to something significantly lighter. It's possible is is working, but your monitor is showing the blue too dark and you can't tell the difference.
I've made a fiddle for testing - http://jsfiddle.net/E28CM/1/ . As you can see, I didn't change your box-shadow code, and this code works in the browsers I have.