如何将此仪表板标题标题更改为以下标题:
我想说基本行车记录仪其中行车记录仪为粗体,RED FONT,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")))