सीएसएस फ़ॉन्ट-वेट प्रॉपर्टी
उदाहरण
तीन पैराग्राफ के लिए अलग-अलग फ़ॉन्ट वजन सेट करें:
p.normal {
font-weight: normal;
}
p.thick {
font-weight: bold;
}
p.thicker {
font-weight: 900;
}
परिभाषा और उपयोग
संपत्ति सेट करती है कि टेक्स्ट में font-weight
कितने मोटे या पतले वर्ण प्रदर्शित होने चाहिए।
डिफ़ॉल्ट मान: | साधारण |
---|---|
विरासत में मिला: | हां |
एनिमेटेबल: | हां। एनिमेटेबल के बारे में पढ़ें |
संस्करण: | सीएसएस 1 |
जावास्क्रिप्ट सिंटैक्स: | ऑब्जेक्ट .style.fontWeight = "बोल्ड" |
ब्राउज़र समर्थन
तालिका में संख्याएं पहले ब्राउज़र संस्करण को निर्दिष्ट करती हैं जो पूरी तरह से संपत्ति का समर्थन करता है।
Property | |||||
---|---|---|---|---|---|
font-weight | 2.0 | 4.0 | 1.0 | 1.3 | 3.5 |
सीएसएस सिंटेक्स
font-weight: normal|bold|bolder|lighter|number|initial|inherit;
सम्पत्ति की कीमत
Value | Description | Play it |
---|---|---|
normal | Defines normal characters. This is default | |
bold | Defines thick characters | |
bolder | Defines thicker characters | |
lighter | Defines lighter characters | |
100 200 300 400 500 600 700 800 900 |
Defines from thin to thick characters. 400 is the same as normal, and 700 is the same as bold | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
संबंधित पृष्ठ
सीएसएस ट्यूटोरियल: सीएसएस फ़ॉन्ट
सीएसएस संदर्भ: फ़ॉन्ट गुण
एचटीएमएल डोम संदर्भ: फॉन्टवेट संपत्ति