问题
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