L
L
Lici2014-09-14 00:35:20
css
Lici, 2014-09-14 00:35:20

Box-Shadow on one side only - how?

Box-Shadow only on one side - how?
Here I want a shadow only on the right. How to do?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Y
Yuri Lobanov, 2014-09-14
@Lici

codepen.io/iiil/pen/FAqjn

V
Volodymyr Godyak, 2014-09-14
@wmgodyak

css3gen.com/box-shadow

L
life_is_good, 2015-10-15
@life_is_good

just make the shadow offset on one side in the positive or negative direction:
box-shadow 0px -7px 10px -9px #000000
the first parameter is to move the shadow on the x, the second - on the y. In my example, the shadow is on the top side. Play with the parameters and get the desired result. I'm sure you've already found the answer to your question

B
BlagoYar Silence, 2018-09-18
@BlagoYar

I suffered a little with box-shadow and decided this (it was necessary from above)

background: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 20%)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question