Can CSS3 box-shadow:inset do only one or two sides? like border-top?

后端 未结 11 1657
时光说笑
时光说笑 2021-01-30 04:44

I\'m wondering about the support for side specific inner shadows in css3.

I know this works great on supported browsers.

div { box-shadow:inset 0px 1px 5         


        
11条回答
  •  迷失自我
    2021-01-30 05:41

    box-shadow: inset 5px 0 5px -5px rgba(0,0,0,0.5),inset -5px 0 5px -5px rgba(0,0,0,0.5);
    -moz-box-shadow: inset 5px 0 5px -5px rgba(0,0,0,0.5),inset -5px 0 5px -5px rgba(0,0,0,0.5);
    -webkit-box-shadow: inset 5px 0 5px -5px rgba(0,0,0,0.5),inset -5px 0 5px -5px rgba(0,0,0,0.5);
    -o-box-shadow: inset 5px 0 5px -5px rgba(0,0,0,0.5),inset -5px 0 5px -5px rgba(0,0,0,0.5);
    

    This works just lovely :)

    Here is a codepen illustrating it: http://codepen.io/poopsplat/pen/cGBLy

提交回复
热议问题