将闪亮的小部件放置在其页眉旁边 [英] Positioning Shiny widgets beside their headers
本文介绍了将闪亮的小部件放置在其页眉旁边的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
selectInput()
的下拉框)放置在它们的标题之外?我一直在尝试各种tags
公式,但一无所获。感谢您的任何指点。
ui.R
library(shiny)
pageWithSidebar(
headerPanel("side-by-side"),
sidebarPanel(
tags$head(
tags$style(type="text/css", ".control-label {display: inline-block;}"),
tags$style(type="text/css", "#options { display: inline-block; }"),
tags$style(type="text/css", "select { display: inline-block; }")
),
selectInput(inputId = "options", label = "dropdown dox:",
choices = list(a = 0, b = 1))
),
mainPanel(
h3("bla bla")
)
)
server.R
shinyServer(function(input, output) { NULL })
推荐答案
这是您想要的吗?
library(shiny)
runApp(list(ui = pageWithSidebar(
headerPanel("side-by-side"),
sidebarPanel(
tags$head(
tags$style(type="text/css", "label.control-label, .selectize-control.single{ display: inline-block!important; }")
),
selectInput(inputId = "options", label = "dropdown dox:",
choices = list(a = 0, b = 1))
),
mainPanel(
h3("bla bla")
)
)
, server = function(input, output) { NULL })
)
这篇关于将闪亮的小部件放置在其页眉旁边的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文