Have a look at the demonstration on Stripe's global webpage. What techniques do they use to ensure that the blue area (the animation showcasing the globe) perfectly matches the width and height of the window?
Please Note: This feature only functions when the page is initially loaded. Give it a try by resizing the browser window and then refreshing the page. You will observe that the blue area aligns seamlessly with the height of the window.