Box Shadow in Firefox

I have a problem with box-shadow in Firefox - it is "behind":

This is my CSS:

 -moz-box-shadow : 0 0 5px #333; -webkit-box-shadow : 0 0 5px #333; box-shadow : 0 0 5px #333; 

It works fine in Chrome (no lag), but it is slow in Firefox.

How can i fix this?

+6
css css3
source share
1 answer

This has been a known bug in Firefox for many years. A shadow box can cause it to scroll slowly, or when you animate an element to which a shadow is assigned, Firefox can scan. The fix is ​​to limit the blur radius to 10 pixels or filter the shadow from Firefox:

 .fubar { box-shadow: 10px 10px 30px #000; -moz-box-shadow:none !important; } @-moz-document url-prefix() { .fubar { box-shadow:none; } } 
+7
source share

All Articles