Computer >> कंप्यूटर ट्यूटोरियल >  >> प्रोग्रामिंग >> CSS

CSS के साथ बैकग्राउंड इमेज निर्दिष्ट करें


CSS background-image प्रॉपर्टी का उपयोग बैकग्राउंड इमेज निर्दिष्ट करने के लिए किया जाता है। आप बैकग्राउंड इमेज सेट करने के लिए निम्न कोड आज़मा सकते हैं:

उदाहरण

<html>   <head>     <style>       #demo {         border: 5px dashed red;         padding: 10px;         background-image: url("https://www.tutorialspoint.com/css/images/css-mini-logo.jpg");       }     </style>   </head>   <body>     <div id="demo">       <h1>www.tutorialspoint.com</h1>       <p>Tutorials Point originated from the idea that there exists a class of readers who respond better to online content and prefer to learn new skills at their own pace from the comforts of their drawing rooms. The journey commenced with a single tutorial on HTML in 2006 and elated by the response it generated, we worked our way to adding fresh tutorials to our repository which now proudly flaunts a wealth of tutorials and allied articles on topics ranging from programming languages to web designing to academics and much more..</p>     </div>   </body> </html>

  1. - CSS के साथ रेडियल ग्रेडिएंट को पृष्ठभूमि छवि के रूप में सेट करें

    radial-gradient() CSS फ़ंक्शन का उपयोग करके रेडियल ग्रेडिएंट को पृष्ठभूमि छवि के रूप में सेट करें। यह फ़ंक्शन एक केंद्र बिंदु से बाहर की ओर फैलने वाला ग्रेडिएंट बनाता है। उदाहरण <!DOCTYPE html> <html> <head> <style> #demo { height: 200px; back

  1. CSS से बैकग्राउंड इमेज सेट करना CSS से बैकग्राउंड इमेज सेट करना

    CSS background-image प्रॉपर्टी का उपयोग चयनित एलिमेंट के लिए एक इमेज को बैकग्राउंड के रूप में सेट करने के लिए किया जाता है। सिंटैक्स CSS background-image प्रॉपर्टी का सिंटैक्स निम्नलिखित है: Selector {    background-image: /*value*/ } निम्नलिखित उदाहरण CSS background-image प्रॉपर्टी को द

  1. CSS से ब्लरी बैकग्राउंड इमेज कैसे बनाएं? CSS से ब्लरी बैकग्राउंड इमेज कैसे बनाएं?

    CSS से ब्लरी बैकग्राउंड इमेज बनाने का कोड निम्नलिखित है:उदाहरण<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body, html {    height: 100vh;    margin: 0;    f