CodePen

HTML

            
              <div class="box"></div>
            
          
!

CSS

            
              body, html{
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.box{
  background: blue;
  width: 60%;
  height: 60%;
}
            
          
!

JavaScript

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