【发布时间】:2018-06-12 18:46:26
【问题描述】:
我能够成功使用闪亮的自定义主题,即
# 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 文本,即“Your Cherry-Picked Palette”不受影响。
R目录结构为here
请帮忙!
【问题讨论】: