如何设置字体的转变

实例解析:

font-variant属性用于设置以小型大写字母的字体显示文本,这意味着所有的小写字母均会被转换为大写,但是所有使用小型大写字体的字母与其余文本相比,其字体尺寸更小

font-variant 属性主要用于定义小型大写字母文本。

可以设置以下的属性值:

 ● normal:默认值,浏览器会显示一个标准的字体。    

 ● small-caps:浏览器会显示小型大写字母的字体。    


继续学习
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> <style> p.normal {font-variant:normal;} p.small {font-variant:small-caps;} </style> </head> <body> <p class="normal">My name is Hege Refsnes.</p> <p class="small">My name is Hege Refsnes.</p> </body> </html>
提交重置代码
章节
笔记
提问
课件
反馈
捐赠

CSS 代码实例