शैली संरेखित सामग्री संपत्ति
उदाहरण
लचीले <div> तत्व की वस्तुओं को पंक्तियों के बीच स्थान के साथ रखें:
document.getElementById("main").style.alignContent = "space-between";
परिभाषा और उपयोग
alignContent गुण लचीले कंटेनर के आइटम को संरेखित करता है जब आइटम क्रॉस-अक्ष (लंबवत) पर सभी उपलब्ध स्थान का उपयोग नहीं करते हैं।
युक्ति: मुख्य-अक्ष (क्षैतिज) पर आइटम्स को संरेखित करने के लिए JustifyContent प्रॉपर्टी का उपयोग करें।
नोट: इस संपत्ति के किसी भी प्रभाव के लिए मदों की कई पंक्तियाँ होनी चाहिए।
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
वेबकिट के बाद नंबर पहले संस्करण को निर्दिष्ट करते हैं जो उपसर्ग के साथ काम करता है।
Property | |||||
---|---|---|---|---|---|
alignContent | 21.0 | 11.0 | 28.0 | 9.0 7.0 Webkit |
12.1 |
वाक्य - विन्यास
alignContent गुण लौटाएँ:
object.style.alignContent
alignContent गुण सेट करें:
object.style.alignContent = "stretch|center|flex-start|flex-end|space-between|space-around|initial|inherit"
सम्पत्ति की कीमत
Value | Description |
---|---|
stretch | Default value. 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 |
space-between | Items are positioned with space between the lines |
space-around | Items are positioned with space before, between, and after the lines |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
टेक्निकल डिटेल
डिफ़ॉल्ट मान: | फैलाव |
---|---|
प्रतिलाभ की मात्रा: | एक स्ट्रिंग, एक तत्व की संरेखण-सामग्री संपत्ति का प्रतिनिधित्व करती है |
सीएसएस संस्करण | CSS3 |
संबंधित पृष्ठ
सीएसएस संदर्भ: संरेखित-सामग्री संपत्ति
HTML डोम स्टाइल संदर्भ: alignItems संपत्ति
HTML डोम स्टाइल संदर्भ: alignSelf संपत्ति
एचटीएमएल डोम स्टाइल संदर्भ: जस्टिफाई कंटेंट प्रॉपर्टी