CSS background प्रॉपर्टी का उपयोग सभी बैकग्राउंड इमेज प्रॉपर्टीज को एक सेक्शन में सेट करने के लिए किया जाता है।
उदाहरण
<html>
<head>
<style>
#demo {
background: lightblue url("https://www.tutorialspoint.com/css/images/css-mini-logo.jpg") no-repeat fixed top;
}
</style>
</head>
</head>
<body>
<div id="demo">
<h1>www.tutorialspoint.com</h1>
<p>Tutorials Point की शुरुआत इस विचार से हुई कि पाठकों का एक वर्ग ऑनलाइन कंटेंट पर बेहतर प्रतिक्रिया देता है...</p>
</div>
</body>
</html>
शॉर्टहैंड सिंटैक्स: background: color image repeat attachment position;
- color: lightblue (बैकग्राउंड कलर)
- image: url(...) (बैकग्राउंड इमेज)
- repeat: no-repeat (रिपीट न करें)
- attachment: fixed (स्क्रॉल पर फिक्स्ड)
- position: top (ऊपर स्थित)