सीएसएस संरेखण-सामग्री संपत्ति
उदाहरण
फ्लेक्स कंटेनर के केंद्र की ओर पैक लाइनें:
div
{
width: 70px;
height: 300px;
border: 1px solid #c3c3c3;
display: flex;
flex-wrap: wrap;
align-content: center;
}
परिभाषा और उपयोग
संपत्ति फ्लेक्स-रैप संपत्ति के align-content
व्यवहार को संशोधित करती है
। यह
अलाइन-आइटम के समान है , लेकिन फ्लेक्स आइटम्स को संरेखित करने के बजाय, यह फ्लेक्स लाइनों को संरेखित करता है।
नोट: इस संपत्ति के किसी भी प्रभाव के लिए मदों की कई पंक्तियाँ होनी चाहिए!
युक्ति: मुख्य-अक्ष (क्षैतिज) पर आइटम्स को संरेखित करने के लिए जस्टिफाई-कंटेंट प्रॉपर्टी का उपयोग करें ।
डिफ़ॉल्ट मान: | फैलाव |
---|---|
विरासत में मिला: | नहीं |
एनिमेटेबल: | नहीं। एनिमेटेबल के बारे में पढ़ें |
संस्करण: | CSS3 |
जावास्क्रिप्ट सिंटैक्स: | ऑब्जेक्ट .style.alignContent="center" |
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
-वेबकिट के बाद की संख्याएं- उपसर्ग के साथ काम करने वाले पहले संस्करण को निर्दिष्ट करें।
Property | |||||
---|---|---|---|---|---|
align-content | 21.0 | 11.0 | 28.0 | 9.0 7.0 -webkit- |
12.1 |
सीएसएस सिंटेक्स
align-content: stretch|center|flex-start|flex-end|space-between|space-around|initial|inherit;
सम्पत्ति की कीमत
Value | Description | Play it |
---|---|---|
stretch | Default value. Lines stretch to take up the remaining space | |
center | Lines are packed toward the center of the flex container | |
flex-start | Lines are packed toward the start of the flex container | |
flex-end | Lines are packed toward the end of the flex container | |
space-between | Lines are evenly distributed in the flex container | |
space-around | Lines are evenly distributed in the flex container, with half-size spaces on either end | |
space-evenly | Lines are evenly distributed in the flex container, with equal space around them | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
संबंधित पृष्ठ
सीएसएस संदर्भ: संरेखित-आइटम संपत्ति
सीएसएस संदर्भ: संरेखित-स्वयं संपत्ति
सीएसएस संदर्भ: औचित्य-सामग्री संपत्ति
HTML DOM संदर्भ: alignContent गुण