re: The Scroll Indicator VIEW POST

re: Why not transform: scaleX();?

Yes, that should also work. Also that avoids adding (*100) to the percentage calculation.

I just went with the simplest approach.In transform people might have to look into transform properties as well.


I wasn't aware that it has an impact on performance.

Transform properties require GPU calculations which are faster. Some more reading here - The good thing here is that the div is detached from the box model of the page, so at least it will not do global recalc ^

code of conduct - report abuse