html - Magento 上自动缩小整个网站?

标签 html css zooming

有没有办法让我的网站自动缩小到 90% ? 谢谢

最佳答案

这可以通过 css3 缩放属性来完成,但请注意,并非所有浏览器都支持。

http://www.w3schools.com/css3/css3_2dtransforms.asp/

    body{

       transform: scale(0.9);
    -ms-transform: scale(0.9); /* IE 9 */
    -webkit-transform: scale(0.9); /* Safari and Chrome */
    -o-transform: scale(0.9); /* Firefox */

}

或者使用适用于跨浏览器的 jquery 和 javascript,在网站外的内容周围附加一个 div,并将正文宽度缩放至 90%;

大致类似于

var bdwidth = $("body").width();

$("wrapper").width((bdwidth / 100)*90);

关于html - Magento 上自动缩小整个网站?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13647610/

相关文章:

html - Cypress 使用带有嵌入式撇号的 'contains' 时出现问题

css - 在 MVC 中向 EditorFor 添加类

ios - 使用 IBAction 按钮缩放 MapView

ios - 是否可以在加载为数据URL的Safari中应用.m3u

html - Facebook 喜欢 div 下面的按钮偏移,即使没有边距或填充

html - 即使设置了 100%,也不使用 100% 宽度的水平导航栏

html - parent 的显示设置为无,但 child 仍然可见?

android - Div 在 Android 上居中对齐但在 iPhone 上不居中

ios - 如何知道 UIView 的当前比例?

css - 在运行时禁用 CTRL/Wheel 缩放效果