Box-shadow not working on webkit?

I create several borders for an element using box-shadow, but they do not appear in Webkit. What is wrong with this code? I use this four times to create a shadow on each side and then a border for an extra border

box-shadow: 1px 1px 0px rgba(0,0,0,0.1); 

Martty Lane

+6
css css3
source share
2 answers

To display the shadow window in webkit browsers, you must use the following statement at the moment:

 -webkit-box-shadow: 1px 1px 0px rgba(0,0,0,0.1); 

To make it compatible with most modern browsers, use this:

 -webkit-box-shadow: 1px 1px 0px rgba(0,0,0,0.1); -moz-box-shadow: 1px 1px 0px rgba(0,0,0,0.1); box-shadow: 1px 1px 0px rgba(0,0,0,0.1); 
+10
source share

This works quite well, but keep in mind that the best practice is to announce the latest generic declaration.

  -webkit-box-shadow: 1px 1px 0px rgba (0,0,0,0.1);
 -moz-box-shadow: 1px 1px 0px rgba (0,0,0,0.1);
 box-shadow: 1px 1px 0px rgba (0,0,0,0.1);
+9
source share

All Articles