Modal Dialog in Shiny: Can adjust width but not height(Shiny中的模态对话框:可以调整宽度但不能调整高度)
问题描述
在我的 Shiny 应用程序中,我有几个来自 shinyBS 包的模式窗口.我可以像这样调整这些模态窗口的宽度:
改变宽度参数中的像素数会改变模态窗口的宽度.但是,如果我使用高度而不是宽度,则更改像素数对模态窗口的高度没有影响.为什么会这样?
你想修改modal-body的高度.试试这个:
<小时><块引用>
在下面回答马克的评论
是的,您可以为此使用 bsModal 的 id,见下文.例如,第一个样式标签现在适用于所有 .modal-dialog 类的 div,它们位于 id 为 boxPopUp1 的 div 中
In my Shiny app, I have several modal windows from the shinyBS package. I am able to adjust the width of these modal windows like so:
And altering the number of pixels in the width argument changes the width of the modal windows. However, if I use height instead of width, altering the number of pixels has no effect on the height of the modal windows. Why might this be?
You want to modify the height of the modal-body. Try this:
EDIT: Answer to Mark's comment below
Yes, you can use the id of the bsModal for that, see below. For example, the first style tag now applies for all div's with class .modal-dialog that are in a div with id boxPopUp1
这篇关于Shiny中的模态对话框:可以调整宽度但不能调整高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!