सीएसएस संरेखण-स्वयं संपत्ति
उदाहरण
किसी लचीले तत्व के अंदर किसी एक आइटम के लिए संरेखण को केंद्र में रखें:
#myBlueDiv
{
align-self: center;
}
परिभाषा और उपयोग
गुण लचीले कंटेनर के align-self
अंदर चयनित आइटम के लिए संरेखण निर्दिष्ट करता है।
नोट:align-self
गुण लचीले कंटेनर के align-items गुण को ओवरराइड
करता है ।
डिफ़ॉल्ट मान: | ऑटो |
---|---|
विरासत में मिला: | नहीं |
एनिमेटेबल: | नहीं। एनिमेटेबल के बारे में पढ़ें |
संस्करण: | CSS3 |
जावास्क्रिप्ट सिंटैक्स: | ऑब्जेक्ट .style.alignSelf="center" |
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
-वेबकिट के बाद की संख्याएं- उपसर्ग के साथ काम करने वाले पहले संस्करण को निर्दिष्ट करें।
Property | |||||
---|---|---|---|---|---|
align-self | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
सीएसएस सिंटेक्स
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
सम्पत्ति की कीमत
Value | Description | Play it |
---|---|---|
auto | Default. The element inherits its parent container's align-items property, or "stretch" if it has no parent container | |
stretch | The element is positioned to fit the container | |
center | The element is positioned at the center of the container | |
flex-start | The element is positioned at the beginning of the container | |
flex-end | The element is positioned at the end of the container | |
baseline | The element is 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 |
संबंधित पृष्ठ
सीएसएस संदर्भ: संरेखित-सामग्री संपत्ति
सीएसएस संदर्भ: संरेखित-आइटम संपत्ति
HTML DOM संदर्भ: alignSelf संपत्ति