Usage of background-position property in CSS

JavascriptWeb DevelopmentFront End Scripts

The background-position property is used to control the position of an image in the background.

Example

You can try to run the following code to learn how to work with the background-position property. It sets the background image position 30 pixels away from the left side:

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