We would like to know how to resize image static and dynamic.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#static {<!-- w ww . ja va 2 s .c om-->
width: 392px;
}
#dynamic {
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<img id="static" src="http://www.java2s.com/style/download.png">
<img id="dynamic" src="http://www.java2s.com/style/download.png">
</body>
</html>
The code above is rendered as follows: