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

前端 未结 7 2283
深忆病人
深忆病人 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:06

    I just had this issue with a design I was working on. Basically, Firefox creates a scrollable area for any shadow that extends past the right edge of the page. For whatever reason, Firefox doesn't create scrollable area if the shadow extends to the left. So my simple solution is to move the shadow completely to the left.

    Problematic Code:

    -moz-box-shadow: 5px 5px 5px #000;
    

    Simple solution:

    -moz-box-shadow: -5px 5px 5px #000;
    

    I tried setting the x-offset to 0px, but since the blur is 5, there was still a scrollable area about 2-3px wide.

提交回复
热议问题