सीएसएस पाठ-सजावट संपत्ति
उदाहरण
<h1>, <h2>, और <h3> तत्वों के लिए अलग-अलग टेक्स्ट डेकोरेशन सेट करें:
h1 {
text-decoration: overline;
}
h2 {
text-decoration: line-through;
}
h3 {
text-decoration: underline;
}
h4 {
text-decoration: underline
overline;
}
नीचे और अधिक "इसे स्वयं आज़माएं" उदाहरण।
परिभाषा और उपयोग
प्रॉपर्टी टेक्स्ट में जोड़े गए डेकोरेशन को text-decoration
निर्दिष्ट करती है, और इसके लिए शॉर्टहैंड प्रॉपर्टी है:
- पाठ-सजावट-पंक्ति (आवश्यक)
- पाठ-सजावट-रंग
- पाठ-सजावट-शैली
डिफ़ॉल्ट मान: | कोई भी वर्तमानरंग ठोस |
---|---|
विरासत में मिला: | नहीं |
एनिमेटेबल: | नहीं, व्यक्तिगत गुण देखें । एनिमेटेबल के बारे में पढ़ें |
संस्करण: | CSS1, CSS3 में नवीनीकृत |
जावास्क्रिप्ट सिंटैक्स: | ऑब्जेक्ट .style.textDecoration="अंडरलाइन" |
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
Property | |||||
---|---|---|---|---|---|
text-decoration | 1.0 | 3.0 | 1.0 | 1.0 | 3.5 |
सीएसएस सिंटेक्स
text-decoration: text-decoration-line text-decoration-color
text-decoration-style|initial|inherit;
सम्पत्ति की कीमत
Value | Description |
---|---|
text-decoration-line | Sets the kind of text decoration to use (like underline, overline, line-through) |
text-decoration-color | Sets the color of the text decoration |
text-decoration-style | Sets the style of the text decoration (like solid, wavy, dotted, dashed, double) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
और ज्यादा उदाहरण
उदाहरण
अधिक टेक्स्ट सजावट जोड़ें:
h1 {
text-decoration: underline overline dotted red;
}
h2 {
text-decoration: underline overline wavy
blue;
}
संबंधित पृष्ठ
सीएसएस ट्यूटोरियल: सीएसएस टेक्स्ट
एचटीएमएल डोम संदर्भ: टेक्स्टडेकोरेशन प्रॉपर्टी