Tuesday, January 6, 2015

Using two CSS box shadow in one element





I have one CSS box shadow (inner line shadow red color in right side of inner box)
box-shadow: inset -10px 0 5px -5px hsla(0,100%,50%,0.5);
Another CSS box shadow (inner line shadow yellow in left side of inner box)
box-shadow: inset 10px 0 5px -5px hsla(30,40%,50%,1.5);
To combine these two shadows in one element, add comma and remove one of box-shadow:
 box-shadow: inset 10px 0 5px -5px hsla(30,40%,50%,1.5), inset -10px 0 5px -5px hsla(0,100%,50%,0.5);

No comments:

Post a Comment