Kom*_*thi 1 css r shiny shinydashboard
附在shiny::selectInputa内shinydashboard::box,以下是Rshiny中的代码:
box(selectInput(inputId = "test", label = "Normalization", choices = 'RSEM: FPKM'), width = 3, background = 'navy')
Run Code Online (Sandbox Code Playgroud)
如何更改框填充以减少底部海军蓝部分?
我尝试使用 css 增加它:
.box {
padding-bottom: 50%;
}
Run Code Online (Sandbox Code Playgroud)
并将底部增加到这个:
但是当我尝试减少它时,它并没有改变:
.box {
padding-bottom: 1%;
}
Run Code Online (Sandbox Code Playgroud)
在form-group和selectize-control两个具有底部边缘,你可以删除。如果你想完全去掉 box padding,你也可以去掉box-body.
下面是一个例子:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody( tags$head(tags$style(HTML('
.form-group, .selectize-control {
margin-bottom: 0px;
}
.box-body {
padding-bottom: 0px;
}'))),
box(selectInput(inputId = "test", label = "Normalization", choices = 'RSEM: FPKM'), width = 3, background = 'navy') )
)
server <- shinyServer(function(input, output) {
})
shinyApp(ui,server)
Run Code Online (Sandbox Code Playgroud)