我能够成功地使用shiny的自定义主题,即
# Internal, hidden function
# Called by CherryPickPalette()
CustomPal <- function(new_pal){
if (interactive()){
cherrypickedpalette <- runApp(list(
ui = fluidPage(
theme = shinythemes::shinytheme("slate"),
将为应用程序提供以下外观
但是,如果我替换为自定义.css,程序将忽略它,即
自定义CSS,h5.css
h5 {
color: orange;
text-align: center;
}
使用h5.css编写代码
# Internal, hidden function
# Called by CherryPickPalette()
CustomPal <- function(new_pal){
if (interactive()){
cherrypickedpalette <- runApp(list(
ui = fluidPage(
theme = "h5.css",
titlePanel("Cherry Pick Your Own Palette!"),
sidebarPanel (hr(),
selectInput('col', 'Options', new_pal, multiple=TRUE, selectize=FALSE, size = 15)
),
mainPanel(
h5('Your Cherry-Picked Palette'),
fluidRow(column(12,verbatimTextOutput("col"))),
h5文本,即“您选择的调色板”不受影响。
R目录结构为here
请帮帮我!
https://stackoverflow.com/questions/50823862
复制相似问题