HTML CSS examples for CSS Property:background
Use image to cover background with background-size:cover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .test {<!--from w w w . jav a2 s .c om--> width: 250px; height: 150px; background: url("https://www.java2s.com/style/demo/InternetExplorer.png") no-repeat left top; background-size: cover; } </style> </head> <body> <div class="test"></div> </body> </html>