We would like to know how to enlarge/scale/Resize Image with different ratios.
<!-- w w w .j a v a 2s.co m-->
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.img-wrapper {
margin: 50px auto;
width: 50%;
height: 250px;
overflow: hidden;
}
.img-wrapper img {
width: 100%;
height: auto;
}
</style>
</head>
<body>
<div class="img-wrapper">
<img src="http://www.java2s.com/style/download.png" alt="" title="" />
</div>
<div class="img-wrapper">
<img
src="http://www.java2s.com/style/download.png"
alt="" title="" />
</div>
</body>
</html>
The code above is rendered as follows: