CodePen

HTML

            
              <ul>
  <li>
    <img src = "http://placehold.it/400x100">
  </li>
</ul>

            
          
!

CSS

            
              li{
  overflow:hidden;
  width: 250px;
}
img {
  border: 3px solid pink;
}
            
          
!

JavaScript

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