Box-shadow and border-radius bug in Chrome

后端 未结 9 1688
盖世英雄少女心
盖世英雄少女心 2020-12-13 09:46

I\'ve been experimenting with CSS3 and found something strange. Heres\'s the part of DIV style:

border:#446429 solid 1px;
border-radius:15px;
-moz-border-rad         


        
9条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-13 10:28

    Beth Fauld's solution almost works, there is only a slight mistake, it should look as follows:

    -webkit-box-shadow:1px 1px 0px 1px #fff inset, 0px 0px 5px #333 inset;
    

    Where #fff is the background color (outside the box), and #333 is the shadow color.

    The third value in -webkit-box-shadow defines the blur size, while the fourth defines the shadow (opaque) size, so it's the latter that should be set to 1px.

提交回复
热议问题