代码之家  ›  专栏  ›  技术社区  ›  foufrix

Css滚动和大小调整

  •  -1
  • foufrix  · 技术社区  · 8 年前

    我有一个很简单的问题

    enter image description here

    我希望地图是完全静态的,并采取100%的高度和其他部分是可滚动的,没有过滤器是可滚动的,并采取所有其余的屏幕,并作出反应。

    目前我已经手动

     .searchresults {
      overflow-y: scroll;
      height: 600px;
    }
    

    .map{
      height: 1000px;
    }
    

    编辑:我在html中选择的内容可能有问题:

    <div class="small-12 large-4  columns mapblock">
        <div class="responsive-embed map">
          <div id="map"></div>
        </div>
      </div>
    

    地图和结果在一个分区中。

    4 回复  |  直到 8 年前
        1
  •  0
  •   Nirav Joshi    8 年前

    css 将在 top-right 100% 身高

    你可以经历这个

    .map{
       position: fixed;
       height: 100%;
       top:0;
       right:0;
       margin:0;
       padding:0;
    }
    
        2
  •  0
  •   bharat bhushan    8 年前

    将这个CSS放在映射代码所在的div中。

    溢出-x:滚动; 身高:100%;

        3
  •  0
  •   Rafael Gadotti Bachovas    8 年前

    height:100vh position:fixed 到地图包装器。

        4
  •  0
  •   Adi    8 年前

    position:fixed;
    height: 100%;
    margin: 0;
    

    与过滤器相同。高度:1000只会在顶部留下一个空白

    (抱歉,无法发表评论)