CSS3 box-shadow + inset + RGBA

家住魔仙堡 提交于 2019-12-10 18:05:52

问题


I'm doing some tests with new features of CSS3, but this combination only works in lastest versions of Chrome and Firefox, but not in Safari or Opera:

box-shadow:         inset 0px -10px 20px 0px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: inset 0px -10px 20px 0px rgba(0, 0, 0, 0.5);
-moz-box-shadow:    inset 0px -10px 20px 0px rgba(0, 0, 0, 0.5);

I really don't know if they fails in the box-shadow itself, in the inset parameter, or in RGBA color. It's a syntax error or simply Safari and Opera lacks on this?


回答1:


The inset keyword is not supported in Safari 4, but is supported in Safari 5 and Opera 10.5. Check that you're using the latest versions of each.

Sources:

  • https://developer.mozilla.org/En/CSS/-moz-box-shadow#Browser_compatibility
  • http://dev.opera.com/articles/view/css3-border-background-boxshadow/#box-shadow



回答2:


This might help the web programmers: opera box-shadow bug , but hopefully the browser developers will notice it too and fix this tiny but unpleasant issue.



来源:https://stackoverflow.com/questions/2490029/css3-box-shadow-inset-rgba

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