शैली पाठसजावट संपत्ति
उदाहरण
किसी तत्व के लिए टेक्स्ट डेकोरेशन सेट करें:
document.getElementById("demo").style.textDecoration = "underline overline";
परिभाषा और उपयोग
टेक्स्ट डेकोरेशन प्रॉपर्टी टेक्स्ट के लिए एक से अधिक डेकोरेशन सेट या रिटर्न करती है।
युक्ति: किसी तत्व के लिए एक से अधिक डेकोरेशन प्रकार निर्दिष्ट करने के लिए, डेकोरेशन प्रकारों की स्पेस से अलग की गई सूची निर्दिष्ट करें।
ब्राउज़र समर्थन
Property | |||||
---|---|---|---|---|---|
textDecoration | Yes | Yes | Yes | Yes | Yes |
वाक्य - विन्यास
टेक्स्ट डेकोरेशन प्रॉपर्टी लौटाएं:
object.style.textDecoration
टेक्स्ट डेकोरेशन प्रॉपर्टी सेट करें:
object.style.textDecoration = "none|underline|overline|line-through|blink|initial|inherit"
सम्पत्ति की कीमत
Value | Description |
---|---|
none | Defines a normal text. This is default |
underline | Defines a line under the text |
overline | Defines a line over the text |
line-through | Defines a line through the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
टेक्निकल डिटेल
डिफ़ॉल्ट मान: | कोई नहीं |
---|---|
प्रतिलाभ की मात्रा: | पाठ में जोड़े गए सजावट का प्रतिनिधित्व करने वाला एक स्ट्रिंग |
सीएसएस संस्करण | सीएसएस 1 |
और ज्यादा उदाहरण
उदाहरण
किसी तत्व की टेक्स्ट सजावट लौटाएं:
alert(document.getElementById("demo").style.textDecoration);
संबंधित पृष्ठ
सीएसएस ट्यूटोरियल: सीएसएस टेक्स्ट
सीएसएस संदर्भ: पाठ-सजावट संपत्ति
❮ स्टाइल ऑब्जेक्ट