स्टाइल लाइनहाइट प्रॉपर्टी
उदाहरण
<div> तत्व के लिए लाइन की ऊंचाई निर्धारित करें:
document.getElementById("myDiv").style.lineHeight = "3";
परिभाषा और उपयोग
लाइनहाइट प्रॉपर्टी टेक्स्ट में लाइनों के बीच की दूरी को सेट या रिटर्न करती है।
ब्राउज़र समर्थन
Property | |||||
---|---|---|---|---|---|
lineHeight | Yes | Yes | Yes | Yes | Yes |
वाक्य - विन्यास
लाइनहाइट संपत्ति लौटाएं:
object.style.lineHeight
लाइनहाइट संपत्ति सेट करें:
object.style.lineHeight = "normal|number|length|%|initial|inherit"
सम्पत्ति की कीमत
Value | Description |
---|---|
normal | Normal line height is used. This is default |
number | A number that will be multiplied with the current font size to set the line height |
length | Defines the line height in length units |
% | Defines the line height in % of the current font size |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
टेक्निकल डिटेल
डिफ़ॉल्ट मान: | साधारण |
---|---|
प्रतिलाभ की मात्रा: | पाठ में पंक्तियों के बीच की दूरी का प्रतिनिधित्व करने वाला एक स्ट्रिंग |
सीएसएस संस्करण | सीएसएस 1 |
और ज्यादा उदाहरण
उदाहरण
<div> तत्व की लाइन ऊंचाई लौटाएं:
alert(document.getElementById("myDiv").style.lineHeight);
संबंधित पृष्ठ
सीएसएस ट्यूटोरियल: सीएसएस टेक्स्ट
सीएसएस संदर्भ: लाइन-ऊंचाई संपत्ति
❮ स्टाइल ऑब्जेक्ट