baseline-shift
baseline-shift
属性允许相对于父文本内容元素的 dominant-baseline 重新定位 dominant-baseline。移动的对象可能是上标或下标。
备注:
作为一个表现属性,baseline-shift
可以用作 CSS 属性。
备注:
此属性将被弃用,建议作者改用 vertical-align
。
你可以将此属性与以下 SVG 元素一起使用:
使用说明
值 |
<length-percentage> | sub |
super
|
---|---|
默认值 | 0 |
动画性 | 有 |
sub
-
dominant-baseline 移动到下标的默认位置。
super
-
dominant-baseline 移动到上标的默认位置。
<length-percentage>
-
长度值,将父文本内容元素的 dominant-baseline 升高(正值)或降低(负值)指定的长度。
百分比值,将父文本内容元素的 dominant-baseline 升高(正值)或降低(负值)至
line-height
指定的百分比。
规范
Specification |
---|
CSS Inline Layout Module Level 3 # baseline-shift-property |
Scalable Vector Graphics (SVG) 2 # BaselineShiftProperty |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
baseline-shift |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.