ShinyでCSS
久々のCSS。F12が大切ってことだ。
.after .shiny-input-container {
margin-top: -10px;
margin-bottom: -10px;
}
上記のstyles.css
をwwwに配置して下記を実行。
library(shiny)
ui <- fluidPage(
tags$head(tags$link(rel="stylesheet", type="text/css", href="styles.css")),
h1("before"),
div(
class="before",
checkboxInput(inputId="x1", label="x1"),
checkboxInput(inputId="x2", label="x2"),
checkboxInput(inputId="x3", label="x3"),
checkboxInput(inputId="x4", label="x4"),
checkboxInput(inputId="x5", label="x5")
),
h1("after"),
div(
class="after",
checkboxInput(inputId="x1", label="x1"),
checkboxInput(inputId="x2", label="x2"),
checkboxInput(inputId="x3", label="x3"),
checkboxInput(inputId="x4", label="x4"),
checkboxInput(inputId="x5", label="x5")
),
absolutePanel(
h1("after"),
div(
class="after",
checkboxInput(inputId="x1", label="x1"),
checkboxInput(inputId="x2", label="x2"),
checkboxInput(inputId="x3", label="x3"),
checkboxInput(inputId="x4", label="x4"),
checkboxInput(inputId="x5", label="x5")
),
top=10, right=10, draggable=TRUE)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
Author And Source
この問題について(ShinyでCSS), 我々は、より多くの情報をここで見つけました https://qiita.com/yono2844/items/1ff11b2c6bf78c39c7e2著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .