我想让我的网站缩小80%.即将图像,字体,所有内容缩小到其当前大小的80%.有没有办法用jQuery或CSS做到这一点?
我试过body { zoom:80% }但它只适用于Chrome.
zoom我正在尝试在我的浏览器上实现ShinyDashboard,因为当 Web 浏览器缩放 80% 时,布局看起来更好。
我找到了一篇关于应用程序的文章Shiny,但是,它不适用于Shinydashboard. 当我实现 CSS 时,我得到了很多死空白。
文章 SO:在浏览器中默认缩小闪亮的应用程序
简单代码示例:
library(shiny)
library(shinydashboard)
header <- dashboardHeader()
sidebar <- dashboardSidebar()
body <- dashboardBody(
tags$style("
body {
-moz-transform: scale(0.8, 0.8); /* Moz-browsers */
zoom: 0.8; /* Other non-webkit browsers */
zoom: 80%; /* Webkit browsers */
}
"),
"test")
ui <- dashboardPage(header, sidebar, body)
server <- function(input, output, session) {}
shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)