HTML CSS examples for CSS Property:background
Use image as background
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!--from www .j a v a 2 s .co m--> width:300px; height:300px; padding:50px; background-image: url('https://www.java2s.com/style/demo/Safari.png'); background-repeat: no-repeat; border: 10px solid rgba(255, 170, 170, .5); } </style> </head> <body> <div></div> </body> </html>