Set the scrolling background image. - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-image

Description

Set the scrolling background image.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head>

      <style>
         body  {<!--  w w w. ja  va  2s  .c  o  m-->
            background-image: url('https://www.java2s.com/style/demo/Opera.png');
            background-repeat: no-repeat;
            background-attachment:scroll;
         }.
      </style>

   </head>
   <body>

      <p>The background-image is fixed. Try to scroll down the page.</p>
      <p>The background-image is fixed. Try to scroll down the page.</p>
      <p>The background-image is fixed. Try to scroll down the page.</p>
      <p>The background-image is fixed. Try to scroll down the page.</p>
      <p>The background-image is fixed. Try to scroll down the page.</p>
      <p>The background-image is fixed. Try to scroll down the page.</p>
      <p>The background-image is fixed. Try to scroll down the page.</p>
      <p>The background-image is fixed. Try to scroll down the page.</p>
      <p>The background-image is fixed. Try to scroll down the page.</p>

   </body>
</html>

Related Tutorials