学习目标:
·完成较为完整的css代码
学习内容:
1、css语法
(1)h1 {color:blue;font-size:12px;}
2、css创建
外部样式表(External style sheet)
内部样式表(Internal style sheet)
内联样式(Inline style)
3、css背景
效果:background-color
background-image
background-repeat
background-attachment
background-position
4、css链接
a:link - 正常,未访问过的链接
a:visited - 用户已访问过的链接
a:hover - 当用户鼠标放在链接上时
a:active - 链接被点击的那一刻
学习产出:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
<style>
body
{
background-color:#d0e4fe;
}
h1
{
color:orange;
text-align:center;
}
p
{
font-family:"Times New Roman";
font-size:20px;
}
</style>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="ha.css">
<title>hhh</title>
<h1>个人简介</h1>
<p>姓名:GE</p>
</head>
<body>
</body>
</html>