我在R / Shiny中使用流体引导网格来创建带有左侧边栏(3)和地图(9)的页面。这是我正在使用的ui代码:
ui <- fluidPage(
fluidRow(
column(3,
"",
tags$head(tags$style(type='text/css', ".nav-tabs {font-size: 10px} ")),
tabsetPanel(id='lefttabsetPanel',selected='placestab',
tabPanel(value="placestab",title='LUGARES',tags$iframe(name="myiframe2",seamless="seamless",src="http://45.56.98.26:8080/exist/rest/db/madrid/xml/dqm-placeography.xml"
,style='height:95vh;width:100%'
)
)
))
,
column(9,
"",
tabsetPanel(id='my_tabsetPanel',
tabPanel('Global Map (click countries and cities for details)',
withSpinner(leafletOutput(outputId="mymap",height = "95vh"),color="#cd0000",type = 5)
)
)
)
)
)
它在台式机和大多数平板电脑上都可以正常显示,但地图在移动设备上的左侧边栏下方会颠簸-即使在横向情况下也是如此。有什么想法我可以解决这个问题吗?
我的预期结果是,在移动设备上,地图减少了纵向显示的两列宽度(笨拙),提示用户切换到应正常显示的横向。这是一个有此问题的地图工作示例,旨在为您提供一个思路:http : //www.readingmadrid.com : 3838/dqm
您需要选择一个适当的混合类来在fluidRow( column(3,...
函数内部进行指定,例如:
fluidRow(column(3, class = "col-xs-4 col-md-3",...))
fluidRow(column(9, class = "col-xs-8 col-md-9",...))
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句