css font-variant属性怎么用

互联网 19-5-27

css font-variant属性简介

使用font-variant属性只有一个作用:把文本设置成小型大写字母,这也是针对英文而言,因为中文不存在大小写之分。

语法:

font-variant:normal/small-caps;

说明:

font-variant属性取值如下:

1.font-variant属性值:normal 默认值,正常效果

2.font-variant属性值:small-caps,小型大写字母的字体

示例

<!DOCTYPE html>  <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title>font-variant属性</title>     <style type="text/css">         #p1{font-variant:normal;}         #p2{font-variant:small-caps;}     </style> </head> <body>     <p id="p1">font-variant属性值为normal(正常效果)</p>     <p id="p2"> font-variant属性值为small-caps(小型大写字母)</p> </body> </html>

运行结果

以上就是css font-variant属性怎么用的详细内容,更多内容请关注技术你好其它相关文章!

来源链接:
免责声明:
1.资讯内容不构成投资建议,投资者应独立决策并自行承担风险
2.本文版权归属原作所有,仅代表作者本人观点,不代表本站的观点或立场
上一篇:php获取远程图片并下载保存到本地的方法分析 下一篇:css height属性怎么用

相关资讯