【发布时间】:2017-11-24 17:53:41
【问题描述】:
我在dashboardHeader 中使用了textAreaInput() 以允许标题中有多行。但是这个文本区域的背景颜色是白色的,不能融入那里的标题面板。我想将此文本区域的背景颜色更改为透明或与dashboardHeader 中使用的颜色相同的颜色。我试过类似下面的东西。但它不起作用。有什么建议么?谢谢!
library(shiny)
library(shinydashboard)
shinyApp(server = function(input, output) {}, ui =
dashboardPage(skin = "blue",
dashboardHeader(
title = textAreaInput(inputId = 'header',label = NULL,
width = 250, height = 100,
value = "This is a very very very very very loooooong title"
),
titleWidth = 260
),
dashboardSidebar(
width = 260,
sidebarMenu(
menuItem("About", tabName = "about", icon = icon("circle")),
menuItem("References", tabName = "ref", icon = icon("book"))
)
),
dashboardBody(
tags$head(tags$style(HTML('
.textArea {
background-color: #0000ff;
border: none;
}
'))),
tabItems(
tabItem(tabName = 'about'),
tabItem(tabName = 'ref')
)
)
))
【问题讨论】:
标签: shiny textarea background-color shinydashboard