我们有一个应用程序,该应用程序的另一个框内有框,并已收到其用户的反馈,他们希望框内的框具有更粗,更引人注目的边框。
下面是我们试图解决此问题的类似代码,但是没有运气。
library(shiny)
library(shinydashboard)
library(htmltools)
ui <- dashboardPage(skin = "black", title = "Dashboard",
dashboardHeader(title = "Dashboard"),
dashboardSidebar(width = 300),
dashboardBody(
tags$head(tags$style(HTML("
// change color (red) and border of boxes
// center text
div.box {
text-align: center;
border-style: solid;
border-bottom-color:#d32017;
border-left-color:#d32017;
border-right-color:#d32017;
border-top-color:#d32017;
border-bottom-width:20px;
border-top-width:20px;
border-left-width:20px;
border-right-width:20px;
}
"))),
box(textOutput("text1"),
box(textOutput("text2"), height = "200px"),
height = "300px"),
box(textOutput("text3"),
box(textOutput("text4"), height = "200px"),
height = "300px")
)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
output$text1 <- renderText({
print("Hello!")
})
output$text2 <- renderText({
print("Goodbye!")
})
output$text3 <- renderText({
print("Hello!")
})
output$text4 <- renderText({
print("Goodbye!")
})
}
# Run the application
shinyApp(ui = ui, server = server)
This is what you see in app with code from above
是否可以使用Shinydashboard做到这一点?如果没有,使用HTML / CSS进行编码的正确方法是什么?
谢谢!