stop overflow auto from displaying scroll bars during height transition - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow

Description

stop overflow auto from displaying scroll bars during height transition

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
html, body {
   height:100%;
   width:100%;
   background:white;
}

.bar-content {<!--  w w w  . j a  v  a 2s.  c  o m-->
   height:201px;
}

.bar-container {
   -webkit-transition:height 0.4s ease-out;
   background-color:Chartreuse;
   height:226px;
   width:100%;
   overflow:hidden;
   height:21px;
}

.bar-container:hover {
   height:226px;
   width:100%;
   background-color:yellow;
}

.barinner {
   height:226px;
   width:100%;
   color:blue;
   opacity:2;
   overflow-x:hidden;
   overflow-y:auto;
}

.bar:hover {
   -webkit-transition:height 0.4s ease-out;
   height:226px;
   width:100%;
   background-color:pink;
   color:OrangeRed;
   opacity:2;
   overflow-x:hidden;
   overflow-y:auto;
}

.bar {
   -webkit-transition:height 0.4s ease-out;
   width:100%;
   background-color:grey;
   height:21px;
   overflow-x:hidden;
   overflow-y:hidden;
}
</style> 
 </head> 
 <body> 
  <div>
    Lorem ipsum dolo 
  </div> 
  <div class="bar-container"> 
   <div class="barinner"> 
    <div class="bar-content"></div> 
   </div> 
  </div> 
  <div>
    Lorem ipsum dolor s 
  </div> 
  <div class="bar"> 
   <div class="bar-content"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials