2016-06-09 100 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>