Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase performance of box-shadow

I think it's quite likely the answer is no, but someone might know something I don't.

I've got an image gallery with sorting buttons that, when clicked, sorted the gallery in an animated style using Isotope. Each image has a nice box-shadow around it, but the animation is sluggish and jerky, due to having to render the shadow all the time.

My question is this: Is there a way to speed up box shadow without changing the blur radius, etc?

like image 747
Bojangles Avatar asked Nov 05 '22 17:11

Bojangles


1 Answers

I suspect there's no way to speed it up.

Have you considered toggling off the box-shadow while the animation is running?

Does the box-shadow use an rgba colour with transparency? Maybe it would be faster without transparency.

like image 189
thirtydot Avatar answered Nov 15 '22 00:11

thirtydot