We would like to know how to scale image width and height.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
<style type='text/css'>
body, .outer {<!--from w w w . j av a2 s . co m-->
width: 100%;
}
img {
background: black;
width: 100%;
}
</style>
</head>
<body>
<div class="outer">
<img src="http://www.java2s.com/style/download.png" />
</div>
</body>
</html>
The code above is rendered as follows: