शैली पृष्ठभूमिमूल संपत्ति
उदाहरण
पृष्ठभूमि छवि को सामग्री बॉक्स के सापेक्ष रखें:
document.getElementById("myDIV").style.backgroundOrigin = "content-box";
परिभाषा और उपयोग
बैकग्राउंडऑरिजिन प्रॉपर्टी बैकग्राउंड-पोजिशन प्रॉपर्टी के सापेक्ष सेट या रिटर्न करती है।
नोट: यदि बैकग्राउंड इमेज के लिए बैकग्राउंड-अटैचमेंट प्रॉपर्टी "फिक्स्ड" है, तो इस प्रॉपर्टी का कोई प्रभाव नहीं पड़ता है।
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
Property | |||||
---|---|---|---|---|---|
backgroundOrigin | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
वाक्य - विन्यास
बैकग्राउंडऑरिजिन प्रॉपर्टी लौटाएं:
object.style.backgroundOrigin
बैकग्राउंडऑरिजिन प्रॉपर्टी सेट करें:
object.style.backgroundOrigin = "padding-box|border-box|content-box|initial|inherit"
सम्पत्ति की कीमत
Value | Description |
---|---|
padding-box | Default value. The background image is positioned relative to the padding box |
border-box | The background image is positioned relative to the border box |
content-box | The background image is positioned relative to the content box |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
टेक्निकल डिटेल
डिफ़ॉल्ट मान: | गद्दी-बॉक्स |
---|---|
प्रतिलाभ की मात्रा: | एक स्ट्रिंग, किसी तत्व की पृष्ठभूमि-मूल संपत्ति का प्रतिनिधित्व करती है |
सीएसएस संस्करण | CSS3 |
संबंधित पृष्ठ
सीएसएस संदर्भ: पृष्ठभूमि-मूल संपत्ति