Page Widget How to - Set a static Background Image








Question

We would like to know how to set a static Background Image.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {<!--   ww w  . j  av a 2  s  . c  o  m-->
  height: 1000px;
  width: 100%;
  background: transparent
    url(http://www.java2s.com/style/download.png)
    no-repeat fixed 0 0;
}
</style>
</head>
<body>
  <div></div>
</body>
</html>

The code above is rendered as follows: