©
This document uses PHP Chinese website manual Release
font-variant:normal | small-caps
默认值:normal
适用于:所有元素
继承性:有
动画性:否
计算值:指定值
normal:正常的字体
small-caps:小型的大写字母字体
对应的脚本特性为fontVariant。
Values | IE | Firefox | Chrome | Safari | Opera | iOS Safari | Android Browser | Android Chrome |
---|---|---|---|---|---|---|---|---|
Basic Support | 6.0+ | 2.0+ | 4.0+ | 3.1+ | 3.5+ | 3.2+ | 2.1+ | 18.0+ |
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8" /> <title>font-variant_CSS参考手册_web前端开发参考手册系列</title> <meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com" /> <style> .test p { margin: 15px 0; border: 1px solid #000; } .small-caps span { font-variant: small-caps; } </style> </head> <body> <ul class="test"> <li> <strong>将文本转换为小型的大写字母</strong> <div>原 文: HOW DO YOU DO & <span>how do you do.</span></div> <div class="small-caps">转换后: HOW DO YOU DO & <span>how do you do.</span></div> </li> </ul> </body> </html>
点击 "运行实例" 按钮查看在线实例