Why does:
div { -webkit-box-shadow: 5px 0 20px #c1c1c1; }
put a shadow underneath the div when it's clearly set to 0?
Why does:
div { -webkit-box-shadow: 5px 0 20px #c1c1c1; }
put a shadow underneath the div when it's clearly set to 0?
It's not putting the shadow "underneath" the box, it's just bluring to the point that it's visible underneath. The parameters are:
-webkit-box-shadow: (Horizontal) (Vertical) (Blur) (Color);
div { -webkit-box-shadow: 5px 0 20px #c1c1c1; }
Sets the -webkit-box-shadow
with an offset of 5px
(horizontal) and 0
(vertical) with a blur radius of 20px
of colour #c1c1c1
.
This means that the shadow isn't set to 0, it's just moved 0
vertically. If you want to have no shadow, either set the blur radius (20px
) to 0
or remove the -webkit-box-shadow
property.