我想扩展我的侧边栏和输入,但是我的css不起作用
dashboardSidebar(
width = 500,
withMathJax(),
sliderInput(inputId = "alpha", "mysliderInput",
label=(helpText(c("Escolha o valor de $\alpha$:"))),
min = 0.01, max = 10, value = 3.48, step = .1,
animate = animationOptions(interval = 300, loop = T)),
sliderInput(inputId = "delta", "mysliderInput",
label=(helpText(c("Escolha o valor de $\delta$:"))),
min = 0.01, max = 10, value = 0.88, step = .1,
animate = animationOptions(interval = 300, loop = T)),
sliderInput(inputId = "sigma", "mysliderInput",
label=(helpText(c("Escolha o valor de $\sigma$:"))),
min = 0.01, max = 10, value = 2.06, step = .1,
animate = animationOptions(interval = 300, loop = T)),
sliderInput(inputId = "gama", "mysliderInput",
label=(helpText(c("Escolha o valor de $\gamma$:"))),
min = 0.01, max = 10, value = 2.97, step = .1,
animate = animationOptions(interval = 300, loop = T)),
sliderInput(inputId = "eta", "mysliderInput",
label=(helpText(c("Escolha o valor de $\eta$:"))),
min = 0.01, max = 10, value = 4.98, step = .1,
animate = animationOptions(interval = 300, loop = T)),
sliderInput(inputId = "lambda", "mysliderInput",
label=(helpText(c("Escolha o valor de $\lambda$:"))),
min = 0.01, max = 10, value = 9.8, step = .1,
animate = animationOptions(interval = 300, loop = T)),
tags$head(
tags$style(HTML("#mysliderInput{width: 500px;}}"
)))
),
我想改变宽度和字体大小。输入
的边栏代码可以直接使用sliderInput
的width参数。下面是一个简单的例子:
library(shiny)
ui <- dashboardPage(dashboardHeader(),
dashboardSidebar(
width = 500,
sliderInput(inputId = "alpha", "mysliderInput",
label=(helpText(c("Escolha o valor de $\alpha$:"))),
min = 0.01, max = 10, value = 3.48, step = .1, width = '500px',
animate = animationOptions(interval = 300, loop = T))
),
dashboardBody()
)
server <- function(input, output) {}
shinyApp(ui = ui, server = server)