[英]Interchange the position of label and check-box in checkboxInput() shiny
在 checkboxInput() 中,復選框默認出現在 label 參數中給出的文本之前。 我試圖將復選框移到左側,將 label 移到右側。 是否有任何 CSS 參數來交換位置也指定 label 和復選框之間的特定間隙?
這主要取自這里:
library(shiny)
ui <- fluidPage(
tags$style("
.cbcontainer {
display: inline-block;
}
.checkbox {
text-align: right;
display: inline-block;
}
.checkbox input {
float: right;
position: relative !important;
margin: 5px !important;
}
.checkbox label {
padding-left: 0px !important;
}
"),
div(checkboxInput("My checkbox", label = "mycheckbox"), class = "cbcontainer")
)
server <- function(input, output, session) {}
shinyApp(ui, server)
為了更好地理解 css 部分,另請參閱此。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.