font-size-adjust
font-size-adjust 屬性允許作者為元素指定一個縱橫比值,該值將保留替代字型中第一個選擇字型的 x-height(x 字高度)。
注意: 作為呈現屬性,font-size-adjust 還有一個對應的 CSS 屬性:font-size-adjust。當兩者都指定時,CSS 屬性具有更高的優先順序。
你可以將此屬性與以下 SVG 元素一起使用
示例
html
<svg
width="600"
height="80"
viewBox="0 0 500 80"
xmlns="http://www.w3.org/2000/svg">
<text y="20" font-family="Times, serif" font-size="10px">
This text uses the Times font (10px), which is hard to read in small sizes.
</text>
<text y="40" font-family="Verdana, sans-serif" font-size="10px">
This text uses the Verdana font (10px), which has relatively large lowercase
letters.
</text>
<text
y="60"
font-family="Times, serif"
font-size="10px"
font-size-adjust="0.58">
This is the 10px Times, but now adjusted to the same aspect ratio as the
Verdana.
</text>
</svg>
用法說明
| 預設值 | none |
|---|---|
| 值 | none | <number> |
| 可動畫的 | 是 |
規範
| 規範 |
|---|
| CSS 字型模組第 4 級 # font-size-adjust-prop |
瀏覽器相容性
載入中…
另見
- CSS
font-size-adjust屬性