I have a problem with box-shadow
in Firefox - it "lags":
This is my CSS:
-moz-box-shadow : 0 0 5px #333;
-webkit-box-shadow : 0 0 5px #333;
box-shadow : 0 0 5px #333;
In Chrome, it works nor开发者_开发问答mally (without "lag"), but in Firefox it's slow.
How can I fix this?
This has been a known bug in Firefox for years. Box-shadow can cause slow scrolling or, when you are animating an element to which box-shadow is assigned, Firefox can crawl. The fix is to eiher restrict blur radius to 10px or filter out the box-shadow from Firefox:
.fubar {
box-shadow: 10px 10px 30px #000;
-moz-box-shadow:none !important;
}
@-moz-document url-prefix() {
.fubar {
box-shadow:none;
}
}
精彩评论