盒子的现状:

我无法改善以下几点:
这就是我迄今尝试过的:
ui.R:
library(shiny)
controls <- list(tags$div(align = 'left',
class = 'multicol',
checkboxGroupInput(inputId = 'modules',
label = "Step 1 : Select the modules to be executed",
choices = c(process_names),
selected = "",
inline = FALSE)))
shinyUI(fluidPage(
tags$style(type='text/css', "label {font-size: 22px; } # controls the text of check-boxes
.form-group {margin-top: 5px; margin-bottom: 5px;}
.nav-tabs {font-family:'arial';font-size:20px}
#sidebar {background-color: #5C97BF;}
#mainbar {background-color: #5C97BF;}
body { background-color: #002B55;}
input[type=checkbox] {transform: scale(2);}
.multicol {height: 200px; -webkit-column-count: 4;
-moz-column-count: 4; /* Firefox */
column-count: 4; -moz-column-fill: auto;-column-fill: auto;} # increases the size of checkboxes
div.checkbox {margin-top: 10px;color:'#FFFFFF';font-weight: bold; }
.btn {display:block;height: 60px;width: 40px;border-radius: 50%;} # for actionButton
"),
sidebarLayout(
position = "left",
sidebarPanel(controls),
mainPanel()
)
))server.R
shinyServer(
function(input, output){
}
)发布于 2017-11-01 07:58:30
以下是您的应用程序的固定代码:
library(shiny)
process_names <- letters[1:13]
controls <- tags$div(
tags$label("Step 1 : Select the modules to be executed"),
tags$div(align = 'left',
class = 'multicol',
checkboxGroupInput(inputId = 'modules',
label = NULL,
choices = c(process_names),
selected = "",
inline = FALSE)))
ui<-(fluidPage(
tags$style(type='text/css', "label {font-size: 22px; }
.form-group {margin-top: 5px; margin-bottom: 5px;}
.nav-tabs {font-family:'arial';font-size:20px}
#sidebar {background-color: #5C97BF;}
#mainbar {background-color: #5C97BF;}
body { background-color: #002B55;}
input[type=checkbox] {transform: scale(2);margin-top:10px;}
.multicol {height: 200px; -webkit-column-count: 4;
-moz-column-count: 4; /* Firefox */
column-count: 4; -moz-column-fill: auto;-column-fill: auto;}
.checkbox {margin-top:-5px;}
.btn {display:block;height: 60px;width: 40px;border-radius: 50%;}
#modules .checkbox label span {font-weight:bold;}
label {color:#fff;}
"),
sidebarLayout(
position = "left",
sidebarPanel(controls),
mainPanel()
)
))
server<-function(input,output){}
shinyApp(ui,server)这解决了你所有的问题。请注意,您有一个大问题(我花了很长时间调试!)您不能在CSS中使用#作为注释。这破坏了你的CSS。您只能在CSS中使用/* comment here */作为注释。
发布于 2017-10-29 07:14:13
label = NULL,并在checkBox()之前添加一个p("text"),使其位于单行上。style="color:#FFFFFF"添加到list(tags$div()中。https://stackoverflow.com/questions/46955204
复制相似问题