Firefox & CSS3: using overflow: hidden and box-shadow

前端 未结 7 2171
深忆病人
深忆病人 2021-02-07 19:40

I\'m not sure whether this bug applies to Firefox only or also to WebKit-based browsers, but it\'s really, really annoying.

I\'ve got a template/framework for my CMS in

7条回答
  •  借酒劲吻你
    2021-02-07 20:19

    You can use the spread radius (the 4th length) to make the shadow's size smaller than the element's size and then a large y offset to let it show beneath the element. Something like box-shadow: 0 10px 10px -5px black; (of course I don't know what values you need since you didn't provide a fiddle, you need to play around with them in the dev tools). Keep in mind that the spread radius causes the shadow to expand/contract from all sides. So, for example, a spread radius of -1px will actually make the shadow 2px narrower.

提交回复
热议问题