How can I add a box-shadow on one side of an element?

后端 未结 13 1113
萌比男神i
萌比男神i 2020-11-28 17:34

I need to create a box-shadow on some block element, but only (for example) on its right side. The way I do it is to wrap the inner element with box-shado

13条回答
  •  借酒劲吻你
    2020-11-28 18:13

    What I do is create a vertical block for the shadow, and place it next to where my block element should be. The two blocks are then wrapped into another block:

    CONTENT

    jsFiddle example here.

提交回复
热议问题