सीएसएस फ़ॉन्ट संपत्ति
सीएसएस फ़ॉन्ट संपत्ति
कोड को छोटा करने के लिए, एक संपत्ति में सभी व्यक्तिगत फ़ॉन्ट गुणों को निर्दिष्ट करना भी संभव है।
संपत्ति के font
लिए एक आशुलिपि संपत्ति है:
font-style
font-variant
font-weight
font-size/line-height
font-family
नोट: और
मान आवश्यक हैं font-size
। font-family
यदि अन्य मानों में से एक गुम है, तो उनके डिफ़ॉल्ट मान का उपयोग किया जाता है।
उदाहरण
font
एक घोषणा में कई फ़ॉन्ट गुण सेट करने के लिए उपयोग करें :
p.a
{
font: 20px Arial, sans-serif;
}
p.b
{
font: italic small-caps bold 12px/30px Georgia, serif;
}
सभी सीएसएस फ़ॉन्ट गुण
Property | Description |
---|---|
font | Sets all the font properties in one declaration |
font-family | Specifies the font family for text |
font-size | Specifies the font size of text |
font-style | Specifies the font style for text |
font-variant | Specifies whether or not a text should be displayed in a small-caps font |
font-weight | Specifies the weight of a font |