![](/img/trans.png)
[英]Is it possible to change the colour of a single character in Shiny Dashboard title?
[英]How to change colour and font of shiny dashboard title?
如何将此仪表板标题的标题更改为以下内容:
我要说的是“基本仪表板” ,其中“仪表板”为粗体,“红色字体”和“基本”为默认的白色字体-我也想将“仪表板”的字体大小调整为更大吗? 关于如何在闪亮的仪表板标题中执行此操作的任何想法?
因此对于DASHBOARD及更高版本,基本上需要将其设为红色和粗体,BASIC保持不变,
下面的代码
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(),
dashboardBody(
# Boxes need to be put in a row (or column)
fluidRow(
box(plotOutput("plot1", height = 250)),
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
)
)
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
}
shinyApp(ui, server)
您可以使用内联css
实现以下目的:
dashboardHeader(title = span("Basic ",
span("dashboard",
style = "color: red; font-size: 28px")))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.