2016-06-09 79 views
0

我有滑塊面板,我在做什麼,當我的滑塊打開,然後它覆蓋所有高度,但無法達到此目的,當我與身體覆蓋隱藏然後,高度是固定的,全部內容未顯示,http://polestarllp.com/polestarnew/our-core-values/Div高度問題,Div高度不包括整個身體

body{ 
     background-color:#FFF; 
     height:100%; 
    width:100%; 
    margin:0; 
     color:#ccc; 
     font-size:3em; 
     line-height:100px; 
     text-align:center; 
    overflow:hidden; 
    } 
    .slidernav{ 
     background:#000; 
     position:absolute; 
     width: 100%; 
     height:100%; 
     top: 0; 
     right:-100%; 
     z-index:9999999999999999999999; 
     overflow:hidden; 
    } 

HTML

<html> 
<body> 
<div class="slidernav"><div> 
</html> 
</body> 

回答

1

代替overflow:hidden;使用overflow-x:hidden;

+0

感謝這個美好的支持真棒,謝謝 –

+0

歡迎@ SanjayYadav – Mani

1

一些牛逼IME在使用overflow: hidden創建問題,那麼下面是最好的解決辦法

.clearfix:after { 
 
    visibility: hidden; 
 
    display: block; 
 
    font-size: 0; 
 
    content: " "; 
 
    clear: both; 
 
    height: 0; 
 
    } 
 
.clearfix { display: inline-block; } 
 

 
* html .clearfix { height: 1%; } 
 
.clearfix { display: block; }
<html> 
 
<body> 
 
<div class="slidernav clearfix"> 
 
    
 
<div> 
 

 
</body> 
 
</html>