font-variant
font-variant 屬性指示文字是否要使用字型 字形 的變體進行渲染。
注意: 作為表示屬性,font-variant 還有一個 CSS 屬性對應項:font-variant。當兩者都被指定時,CSS 屬性具有優先權。
你可以將此屬性與以下 SVG 元素一起使用
示例
控制 SVG 字型變體
<svg viewBox="0 0 250 30" xmlns="http://www.w3.org/2000/svg">
<text y="20" font-variant="normal">Normal text</text>
<text x="100" y="20" font-variant="small-caps">Small-caps text</text>
</svg>
用法說明
| 值 |
|
|---|---|
| 預設值 | normal |
| 可動畫的 | 是 |
關於值的說明,請參閱 CSS font-variant 屬性。
規範
| 規範 |
|---|
| CSS 字型模組第 4 級 # font-variant-prop |
| Scalable Vector Graphics (SVG) 2 # FontVariantProperty |
瀏覽器相容性
載入中…
另見
- CSS
font-variant屬性