Set the Background Image Position with CSS

JavascriptWeb DevelopmentFront End Scripts

To set the background image position, use the background-position property. You can try to run the following code to learn how to work with the background-position property:

Example

It sets the background image position 80 pixels away from the left side:

<html>
   <head>
      <style>
         body {
            background-image: url("/css/images/css.jpg");
            background-position:80px;
         }
      </style>
   </head>
   <body>
      <p>Tutorials point</>
   </body>
</html>
raja
Published on 13-Apr-2018 12:17:04
Advertisements