1、定义字体类型
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>字体样式</title>
<style type="text/css">
body {/* 页面基本属性 */
font-family:"Times New Roman",Georgia,Serif; /* 字体类型 */
}
p {/* 段落样式 */
font:50px "隶书"; /* 50像素大小的隶书字体 */
}
</style>
</head>
<body>
<p>定义字体类型为"Times New Roman",Georgia,Serif,字体大小为50px</p>
</body>
</html>

本文深入讲解了如何使用CSS定义字体类型和大小,包括设置页面基本属性的'font-family'属性和段落样式的具体应用。通过示例代码,读者可以学习到如何指定多种备选字体以及如何设定特定大小的字体。
1120

被折叠的 条评论
为什么被折叠?



