स्टाइल जस्टिफाई कंटेंट प्रॉपर्टी
उदाहरण
लचीले <div> तत्व की वस्तुओं के बीच कुछ जगह बनाएं:
document.getElementById("main").style.justifyContent = "space-between";
परिभाषा और उपयोग
जब आइटम मुख्य-अक्ष (क्षैतिज) पर सभी उपलब्ध स्थान का उपयोग नहीं करते हैं तो JustifyContent गुण लचीले कंटेनर के आइटम को संरेखित करता है।
युक्ति: क्रॉस-अक्ष पर आइटम्स को संरेखित करने के लिए alignContent प्रॉपर्टी का उपयोग करें (लंबवत)।
ब्राउज़र समर्थन
Property | |||||
---|---|---|---|---|---|
justifyContent | Yes | 12.0 | Yes | 9.0 | Yes |
वाक्य - विन्यास
औचित्य सामग्री वापस करें:
object.style.justifyContent
JustifyContent प्रॉपर्टी सेट करें:
object.style.justifyContent = "flex-start|flex-end|center|space-between|space-around|initial|inherit"
सम्पत्ति की कीमत
Value | Description |
---|---|
flex-start | Default value. Items are positioned at the beginning of the container |
flex-end | Items are positioned at the end of the container |
center | Items are positioned at the center 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 डोम स्टाइल संदर्भ: alignContent गुण
HTML डोम स्टाइल संदर्भ: alignItems संपत्ति
HTML डोम स्टाइल संदर्भ: alignSelf संपत्ति
❮ स्टाइल ऑब्जेक्ट