如何使用jQuery或CSS缩小整个网站? [英] How do I zoom out a whole website using jQuery or CSS?

查看:125
本文介绍了如何使用jQuery或CSS缩小整个网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让我的网站缩小80%。即将图像,字体,所有内容缩小到其当前大小的80%。有没有办法用jQuery或CSS做到这一点?

I would like to make my website like 80% smaller. i.e. zoom out images, fonts, everything to 80% of its current size. Is there any way to do this using jQuery or CSS?

我试过 body {zoom:80%} 但是它仅适用于Chrome。

I tried body { zoom:80% } but it works only for Chrome.

推荐答案

CSS解决方案:

body {
    -moz-transform: scale(0.8, 0.8); /* Moz-browsers */
    zoom: 0.8; /* Other non-webkit browsers */
    zoom: 80%; /* Webkit browsers */
}

支持所有主流浏览器 http://caniuse.com/#feat=css-zoom

对于Firefox,后备是变换规模的 http://caniuse.com/#feat=transforms2d

For Firefox, fallback is transform-scale http://caniuse.com/#feat=transforms2d

这篇关于如何使用jQuery或CSS缩小整个网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆