2014-05-22 26 views
0
<style> 
    .mapstyle { 
      height: 100%; 
      height: -webkit-calc(100% - 60px); 
      height: -moz-calc(100% - 60px); 
      height: calc(100% - 60px); 
      margin-left: 300px; 
    } 
</style> 

<div style="margin:0 auto; position:relative; text-align: left; width: 100%;"> 
<div style"width:100%;"><h1>HEADER</h1></div> 
<div style="width: 300px; position: absolute; top: 100px; left: 0;">test</div> 
<div id="map" class="mapstyle"> 
     <script>.... 
       var map = L.map('map').setView([57.3, 29.4],).setMaxBounds(bounds); 
       ...//Leafletjs.com 
     </script> 
</div> 
</div> 

函数calc()在css中不能在firefox中工作29.0.1,其他浏览器正在工作。FireFox中不工作的css calc()29.0.1

+2

请张贴*完整*的代码示例和解释什么是 “不工作” 的意思完全相同。你为什么要四次定义身高?另外,jsFiddle.net示例可能会有所帮助。 – j08691

回答