javascript - R shiny 中的绝对面板隐藏在传单输出后面

标签 javascript css r shiny

我正在尝试全屏制作传单 map ,并在 map 顶部添加过滤器控件。但是,当我尝试这样做时,我的过滤器控件(绝对面板)在运行时隐藏在传单输出后面。

Absolute panel is present when I give width manually

我希望 map 是全屏的,当我这样做时,it gets hidden behind the map.

如何使 map 位于绝对面板后面? 感谢您的帮助。

谢谢

界面代码如下:

fluidPage(style="padding-top: 10px;",
      h1("Locations"),
      absolutePanel(
        top = 60, left = "auto", right = 20, bottom = "auto",
        width = 330, height = "auto",draggable = TRUE,
        wellPanel(
          selectInput("Suburb", "Select one Suburb:",choices = c("Select one Suburb" = "All", as.character(mydata$SuburbTown))),
          uiOutput("secondselection")
          ),
        style = "opacity: 0.65"
          ),

      leafletOutput("leafl", height = "800px")
          )

最佳答案

您可以更改面板的 z-index 以使其正常工作。 试试这个:

fluidPage(style="padding-top: 10px;",
      h1("Locations"),
      absolutePanel(
        top = 60, left = "auto", right = 20, bottom = "auto",
        width = 330, height = "auto",draggable = TRUE,
        wellPanel(
          selectInput("Suburb", "Select one Suburb:",choices = c("Select one Suburb" = "All", as.character(mydata$SuburbTown))),
          uiOutput("secondselection")
        ),
        style = "opacity: 0.65; z-index: 10;" ## z-index modification
      ),

      leafletOutput("leafl", height = "800px")
)

关于javascript - R shiny 中的绝对面板隐藏在传单输出后面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50110488/

相关文章:

javascript - 如何在选择网格内的下拉菜单时停止刷新剑道网格?

javascript - 延迟 Javascript 解析 - GTMetrix.com

javascript - 从 Mongoose 调用存储的 javascript 函数?

javascript - 有没有办法使用 JavaScript 重新定位 DOM 元素?

图像上的CSS透明形状

r - R 中 'cumsum' 对象的 "difftime"的等效函数

javascript - Emberjs - 对 {{view Ember.TextField}} 使用 bubbles=false 不起作用

r - 当 "warnings()"出现在 R 中时中断循环

html - 使用 xpathSApply 的相同代码搜索多个路径

html - 并排对齐固定大小的 block 和响应 block ?