TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Help: Possible To Scale Up/Down Entire Website Using jQuery?

1 点作者 jhacks超过 12 年前
I have a fixed aspect ratio design that I will be keeping fixed (not standard website design, but useful for my case). I designed it in pixels to ease the burden while designing (not having to constantly calculate percentages for every single element). However, I don't think there will ever be a time that converting pixels to percentages will be anything less than torturous.<p>So, I'm looking for a jQuery solution to simply scale all my CSS up or down. As long as the script can properly scale everything just as it would if the CSS were all in percentages, then a lot of time and pain will be saved. Not just now, but for all future development as well. Hopefully the solution can be relatively lightweight as well (as comparable as possible to the speed of CSS in percentages).<p>I am crossing my fingers that the above is possible. I'd prefer to scale the website up against browser window size (100% height or width, depends on browser aspect ratio). It seems far simpler / cleaner than converting all my CSS to percentages and adjusting parent container to browser window size.<p>Any and all help is appreciated. Thanks!

1 comment

lukepeters超过 12 年前
Animate the body element maybe? Not tested :D