gpt4 book ai didi

html - 底部对齐 R shiny 中的按钮

转载 作者:技术小花猫 更新时间:2023-10-29 12:04:14 24 4
gpt4 key购买 nike

我想不出一种方法将 downloadButtonselectizeInput 底部对齐,即,

enter image description here

library(shiny)

runApp(list(
ui = shinyUI(fluidPage(
fluidRow(align="bottom",
column(12, align="bottom",
h4("Download Options:"),
fluidRow(align="bottom",
column(6, selectizeInput("plot_dl", "File Type", width="100%",
choices = list("PDF"="pdf","PNG"="png"))),
column(3, downloadButton('plot1_dl', 'Left Plot')),
column(3, downloadButton('plot2_dl', 'Right Plot'))
)
)
),
tags$style(type='text/css', "#plot1_dl { width:100%; vertical-align:bottom}"),
tags$style(type='text/css', "#plot2_dl { width:100%;}")
)),
server = function(input, output) {
}
))

在任何地方放置 align="bottom" 都不会抛出错误消息,但也没有达到预期的效果。尝试使用按钮的样式标签,但超出了我的理解范围。

最佳答案

在样式标签中找到了一个带有 margin-top: 25px 的临时修复...

enter image description here

library(shiny)

runApp(list(
ui = shinyUI(fluidPage(
h4("Download Options:"),
fluidRow(
column(6, selectizeInput("plot_dl", "File Type", width="100%",
choices = list("PDF"="pdf","PNG"="png"))),
column(3, downloadButton('plot1_dl', 'Left Plot')),
column(3, downloadButton('plot2_dl', 'Right Plot'))
),
tags$style(type='text/css', "#plot1_dl { width:100%; margin-top: 25px;}"),
tags$style(type='text/css', "#plot2_dl { width:100%; margin-top: 25px;}")
)),
server = function(input, output) {
}
))

关于html - 底部对齐 R shiny 中的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28960189/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com