सीएसएस पाठ-संरेखण-अंतिम संपत्ति
उदाहरण
पाठ की अंतिम पंक्ति को तीन <div> तत्वों में संरेखित करें:
div.a
{
text-align: justify; /* For Edge */
text-align-last: right;
}
div.b
{
text-align: justify; /* For Edge */
text-align-last: center;
}
div.c
{
text-align: justify; /* For Edge */
text-align-last: justify;
}
नीचे और अधिक "इसे स्वयं आज़माएं" उदाहरण।
परिभाषा और उपयोग
संपत्ति निर्दिष्ट करती है कि किसी पाठ की text-align-last
अंतिम पंक्ति को कैसे संरेखित किया जाए।
ध्यान दें कि text-align-last
संपत्ति चयनित तत्व के भीतर सभी अंतिम पंक्तियों के लिए संरेखण सेट करती है। इसलिए, यदि आपके पास <div> में तीन पैराग्राफ हैं, तो text-align-last
प्रत्येक पैराग्राफ की अंतिम पंक्ति पर लागू होगा। कंटेनर में केवल अंतिम पैराग्राफ पर उपयोग करने के लिए text-align-last
, आप उपयोग कर सकते हैं: अंतिम बच्चा, नीचे उदाहरण देखें।
नोट: एज 79 से पहले, text-align-last
संपत्ति केवल उस टेक्स्ट पर काम करती है जिसमें "टेक्स्ट-एलाइन: जस्टिफाई" है।
डिफ़ॉल्ट मान: | ऑटो |
---|---|
विरासत में मिला: | हां |
एनिमेटेबल: | नहीं। एनिमेटेबल के बारे में पढ़ें |
संस्करण: | CSS3 |
जावास्क्रिप्ट सिंटैक्स: | ऑब्जेक्ट .style.textAlignLast="right" |
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
नंबर के बाद -मोज़- पहले संस्करण को निर्दिष्ट करें जो उपसर्ग के साथ काम करता है।
Property | |||||
---|---|---|---|---|---|
text-align-last | 47.0 | 5.5* | 49.0 12.0 -moz- |
Not supported | 34.0 |
*इंटरनेट एक्सप्लोरर 11 (और पहले) में, "प्रारंभ" और "अंत" मान समर्थित नहीं हैं।
सीएसएस सिंटेक्स
text-align-last: auto|left|right|center|justify|start|end|initial|inherit;
सम्पत्ति की कीमत
Value | Description | Play it |
---|---|---|
auto | Default value. The last line is justified and aligned left | |
left | The last line is aligned to the left | |
right | The last line is aligned to the right | |
center | The last line is center-aligned | |
justify | The last line is justified as the rest of the lines | |
start | The last line is aligned at the beginning of the line (left if the text-direction is left-to-right, and right is the text-direction is right-to-left) | |
end | The last line is aligned at the end of the line (right if the text-direction is left-to-right, and left is the text-direction is right-to-left) | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
और ज्यादा उदाहरण
उदाहरण
कंटेनर में केवल अंतिम पंक्ति पर टेक्स्ट-एलाइन-आखिरी का प्रयोग करें:
div.b p:last-child {
text-align-last: center;
}
संबंधित पृष्ठ
सीएसएस ट्यूटोरियल: सीएसएस टेक्स्ट
HTML DOM संदर्भ: textAlignLast गुण