The ‘root element’ parallax technique | Bypeople

The ‘root element’ parallax technique

By combining the power of rem and a small JavaScript function to manipulate the font-size of the html element, we can achieve simple but effective parallaxing.Setting all our positions and parallax movements in CSS, this technique minimises DOM manipulations to just one – on the html element – boosting overall performance.The speed and direction of each element is set using margins (for this demo I’ve used margin-top). Play around with the numbers yourself to get a better understanding.This …

Related Deals

Related Posts