शैली संरेखित करेंआइटम संपत्ति
उदाहरण
कंटेनर की शुरुआत में लचीले <div> तत्व के सभी आइटम के लिए संरेखण की स्थिति बनाएं:
document.getElementById("main").style.alignItems = "flex-start";
परिभाषा और उपयोग
alignItems गुण लचीले कंटेनर के अंदर आइटम के लिए डिफ़ॉल्ट संरेखण निर्दिष्ट करता है।
युक्ति: align-items गुण को ओवरराइड करने के लिए प्रत्येक आइटम की align-self प्रॉपर्टी का उपयोग करें।
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
वेबकिट के बाद नंबर पहले संस्करण को निर्दिष्ट करते हैं जो उपसर्ग के साथ काम करता है।
Property | |||||
---|---|---|---|---|---|
alignItems | 21.0 | 11.0 | 20.0 | 9.0 7.0 Webkit |
12.1 |
वाक्य - विन्यास
alignItems संपत्ति लौटाएं:
object.style.alignItems
alignItems गुण सेट करें:
object.style.alignItems = "stretch|center|flex-start|flex-end|baseline|initial|inherit"
सम्पत्ति की कीमत
Value | Description |
---|---|
stretch | Default. Items are stretched to fit the container |
center | Items are positioned at the center of the container |
flex-start | Items are positioned at the beginning of the container |
flex-end | Items are positioned at the end of the container |
baseline | Items are positioned at the baseline of the container |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
टेक्निकल डिटेल
डिफ़ॉल्ट मान: | फैलाव |
---|---|
प्रतिलाभ की मात्रा: | एक स्ट्रिंग, एक तत्व की संरेखण-आइटम संपत्ति का प्रतिनिधित्व करता है |
सीएसएस संस्करण | CSS3 |
संबंधित पृष्ठ
सीएसएस संदर्भ: संरेखित-आइटम संपत्ति
HTML डोम स्टाइल संदर्भ: alignContent गुण
HTML डोम स्टाइल संदर्भ: alignSelf संपत्ति