Keep entire page aspect ratio when resizing

I was wondering if there is a way to keep the aspect ratio of the entire page when page width changes? For example element width and height is always a fixed % of the current user’s window dimensions.