<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
/* 标签选择器设置样式 */
p{
color: red;
font-size: 30px;
font-family: "楷体";
}
/* 类型选择器 */
.cn{color: blue;
font-size: 30px;
font-family: "楷体";}
/* id选择器 */
#wd{
color: green;
font-size: 30px;
font-family: "楷体";
}
/* 派生选择器 */
h2{color: #0000FF;}
.test{font-size: 40px;}
.test1{color: #008000;}
.test2{color: #FF0000;}
.test3{color: aqua;}
.test4{color: aquamarine;}
</style>
</head>
<!--css和选择器的使用-->
<body>
<p>武汉加油!!!!</p>
<p class="cn">中国加油!!!!</p>
<p id="wd">世界加油!!!!</p>
<h2>静夜思</h2>
<p class="test test1">窗前明月光</p>
<p class="test test2">疑是地上霜</p>
<p class="test test3">举头望明月</p>
<p class="test test4">低头思故乡</p>
</body>
</html>
web前端基础(06css)
猜你喜欢
转载自blog.csdn.net/chehec2010/article/details/104446110
今日推荐
周排行