[英]How to add css tag to SideBarPanel in Shiny App (R)
I want to change the background color of the sideBarPanels on my page in my shiny app....but...only on one specific page. 我想在我的闪亮应用程序中更改我的页面上sideBarPanels的背景颜色....但是......仅在一个特定页面上。 So I am thinking of using CSS tags but am unsure how to do it. 所以我在考虑使用CSS标签,但我不确定如何做到这一点。
I tried this: 我试过这个:
sidebarPanel(class="set1",
htmlOutput("vizTest")
)
And then tried referencing the class in the CSS file: 然后尝试引用CSS文件中的类:
#set1 form.well {
background: transparent;
border: 0px;
}
So the trick was to wrap the sidebarPanel in a div and then set the class for the div. 所以诀窍是将sidebarPanel包装在div中,然后为div设置类。 Then it can be referenced in the usual manner using the '.' 然后可以使用'。'以通常的方式引用它。 prefix: 字首:
ui.R ui.R
div(class="set1",
sidebarPanel(
#content of panel here
))
css file css文件
.set1 form.well {
background: transparent;
border: 0px;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.