CodePen

HTML

            
              <div id="first">
  <div id="second">
    <div id="third">
    </div>
  </div>
</div>
            
          
!

CSS

            
              #first {
  margin: 100px;
  width: 300px;
  height: 200px;
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
}

#second {
  width: 300px;
  height: 200px;
  background: red;
}

#third {
  position: absolute;
  top: -30px;
  width: 100px;
  height: 100px;
  background: yellow;
}  
            
          
!

JavaScript

            
              
            
          
!
999px
Loading ..................