嗨,我正在尝试在闪亮的按钮上放置一个操作按钮,我的代码如下
library(shiny)
library(shinyjs)
library(shinyWidgets)
shinyApp(
ui = shinyUI(fluidPage(useShinyjs(),setBackgroundColor("black"),
actionButton("button", "don't press the button", icon("paper-plane"),
style="color: #fff; background-color: #000000; border-color: #FF0000"),
hidden(
div(id='text_div',
verbatimTextOutput("text")
)
)
)
),
server = function(input, output, session){
observeEvent(input$button, {
toggle('text_div')
output$text <- renderText({"ahh you pressed it"})
})
}
)
一切正常,除了在我运行文档时,按钮落入一个巨大的框内,而我只是想成为按钮。 我将添加一些图片,以更好地解释它: