Get <img> tag to auto-scale with page size - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image

Description

Get <img> tag to auto-scale with page size

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
img {<!-- ww w.jav  a 2s  . com-->
   width:100%;
   height:auto;
}
</style> 
 </head> 
 <body translate="no"> 
  <img src="https://www.java2s.com/style/demo/Safari.png">  
 </body>
</html>

Related Tutorials