i have a line of width: 15px; and height of 2px;
my question is, how to create the shadow only on right and left side?
This fiddle has examples showing shadows only on:
With that you should be able to do any kind of shadow.
http://jsfiddle.net/rafaelchiti/5jdHW/
The code:
div {
margin-top: 20px;
margin-left: 20px;
width: 100px;
height: 100px;
}
.horizontal {
box-shadow: 0px 15px 10px -11px rgba(0, 0, 0, .1) inset,
0px -15px 10px -11px rgba(0, 0, 0, .1) inset;
}
.vertical {
box-shadow: 0px 15px 10px -11px rgba(0, 0, 0, .1) inset,
0px -15px 10px -11px rgba(0, 0, 0, .1) inset;
}
.one-side {
box-shadow: 0px 15px 10px -11px rgba(0, 0, 0, .1) inset;
}
Hope this help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With