css实例007--css⽂字类型设置
css⽂字类型设置
font-style: italic; /*倾斜字体*/ font-style: normal; /*正常字体不倾斜*/
font-weight: 400; /*是否加粗 400 是不加粗 700是加粗*/
font-size: 50px; /*字号⼤⼩*/
font-family: 'Times New Roman', Times, serif; /*字体*/
复合形式:
/* 400 是不加粗 700是加粗 /
/ 必须要有字号和字体 其他的可以省略 顺序不能乱 /
/
font-style:normal;font-weight: 400; font-size: 30px;font-family: Arial, Helvetica, sans-serif; */ font: normal 400 30px Arial, Helvetica, sans-serif;
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
国家海洋局极地办
<meta http-equiv="X-UA-Compatible"content="IE=edge">
<meta name="viewport"content="width=device-width, initial-scale=1.0">
<title>字体系列</title>
<style>
body{
/* font-family:Arial, Helvetica, sans-serif;
font-size: 30px;
项目成本管理论文
font-style: normal;
font:fontstyle fontHeight fontsize fontFamily */
/* 400 是不加粗 700是加粗 */
/* 必须要有字号和字体其他的可以省略顺序不能乱 */
/* font-style:normal;font-weight: 400; font-size: 30px;font-family: Arial, Helvetica, sans-serif; */
font: normal 400 30px Arial, Helvetica, sans-serif;
}
h1{
font-style: italic;/*倾斜字体*/
font-style: normal;/*正常字体不倾斜*/
网络市场营销
font-weight: 400;/*是否加粗 400 是不加粗 700是加粗*/
font-size: 50px;/*字号⼤⼩*/
font-family:'Times New Roman', Times, serif;/*字体*/
}
</style>
</head>
<body>
<h1 align="center">静夜思</h1>
<h3 align="center"> --李⽩</h3>
<div align="center">midd
窗前明⽉光<br>
疑似地上霜<br>视觉影像
举头望明⽉<br>
低头思故乡<br>
</div>
</body>