
font属性的综合写法,书写顺序分别是:font-style font-variant font-weight font-size font-family。
实例:
.ziti {font:italic normal bold 18px arial;}如果哪项属性是默认值,可以把他省略不写,系统会自动解析其为默认值。
font的取值有点复杂,取值主要分为两部分,现在举几个[ [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family> ]取值的例子,如下:
p
{
font:italic small-caps bold 12px/1.2em Arial;
}推荐教程:css快速入门
以上就是font属性的综合写法的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号