Shorthand property to set the background in CSS


You can use the background property to set all the background properties at once such as background image position, repeat, etc:

Example

<html>
   <head>
   </head>
   <body>
      <p style = "background:url(/images/pattern1.gif) repeat fixed;">
         This parapgraph has fixed repeated background image.
      </p>
   </body>
</html>

Lakshmi Srinivas
Lakshmi Srinivas

Programmer / Analyst / Technician

Updated on: 30-Jan-2020

67 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements