我需要将整个网站缩小到 80%
我刚刚为客户建立了一个网站,根据他们发给我的 Photoshop 文件,他们回来告诉我,不知何故,PSD 的大小是其应有的 125%,他们需要将所有内容缩小到现在的80%。
我想我需要重新剪切所有图像,但我不想重写 CSS,所以我正在探索替代方案。
目前,所有值均以像素为单位。我想知道是否应该尝试找到一个将所有像素值乘以 0.8 的脚本,或者是否应该使用 px 到 em 转换器,然后将 html 标记中的基本大小设置为 80%,或者如果有更好的方法来解决这个问题。
I just built out a website for a client, based on the Photoshop files they sent me, and they came back and told me that somehow the PSDs were 125% the size they were supposed to be, and that they need be to shrink everything to 80% of what it is now.
I figure I'm going to need to re-cut all the images, but I would rather not rewrite the CSS so I'm exploring alternatives.
Currently, all values are in pixels. I'm wondering if I should try to find a script that would take all the pixel values and multiply by .8, or if I should use a px to em converter and then set the base size in the html tag to 80%, or if there is better way to fix this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
丑陋的 CSS 黑客警报! :D
更新
看来最新的 Chrome 和 IE10 支持(并适用)两者
zoom
和transform< /code> 同时缩放两倍,因此我建议在测试旧版 IE 浏览器时仅使用
zoom
。Ugly css hack alert! :D
Update
It appears latest Chrome and IE10 supports (and applies) both
zoom
andtransform
at the same time, scaling it twice, so I recommend only usingzoom
when testing old IE browsers.您可以调整宽度为 80% 的 iframe 内的页面大小。您需要删除边框并关闭滚动,但它应该可以工作。
教程在这里
如何缩放 iframe 的内容?
我还没有尝试过,但如果你问我的话,就浏览器兼容性和错误而言,它似乎可能是粗略的。只是想我会把它传递下去
You can re-size the page inside of an iframe that is at 80% width. You would need to remove the borders and turn scrolling of but it should work.
Tutorial here
How can I scale the content of an iframe?
I haven't tried it but it seems like it could possibly be sketchy as far a browser compatibility and bugs if you ask me. just thought i would pass it along