3 ms·
Canvas is better...if you're trying to do something that stays within a fixed-size box.
by dmazzoni 2y ago
Canvas is better...if you're trying to do something that stays within a fixed-size box.
- kroltan 2y agoCanvas would still be faster even if you used a full-screen box. Just the string concatenation overhead of doing this with box-shadows is insanely wasteful. Which isn't to demerit the hackish creativity of taking one thing and running with it! But if you wanted to do a ball painting effect like that outside this "what if" context, it would be technically irresponsible to do it with box-shadows.