Vas*_*sim 5 css r shiny shinydashboard
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
wellPanel(tags$div(id="pane",
fluidRow(
column(width = 6,valueBox("test","test1"),
valueBox("test","test2"))),
fluidRow(
column(width = 6,valueBox("test","test3"),
valueBox("test","test4")
))),
tags$style(type="text/css","#pane{font-size:20px;}"))
))
# )
server <- function(input, output) {}
shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)
结果
但是,我只需要突出显示的部分;即井板宽度应按照盒子的宽度
这只是一个例子,除了不同的井板之外,我还将添加四个盒子。
尝试在 valueBox 中使用宽度
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
fluidRow(column(width = 6, wellPanel(tags$div(id="pane",
fluidRow(valueBox(width = 6, "test","test1"), valueBox(width = 6, "test","test2")),
fluidRow(valueBox(width = 6, "test","test3"), valueBox(width = 6, "test","test4")),
tags$style(type="text/css","#pane{font-size:20px;}")
))))
)
)
server <- function(input, output) {}
shinyApp(ui, server)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4949 次 |
| 最近记录: |