1.常用选择器
<!DOCTYPE html>
<html lang="en">
<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>Document</title>
<style>
p{
color: orange;
font-size: 60px;
}
#kobe{
color: orange;
}
/*
id选择器
语法:#id属性值{}
id名尽量不要重复
*/
.JAMES{
color: palegreen;
}
.DAVIDS{
font-size: 30px;
}
/*
class类选择器
语法:.class属性值
一个元素可以指定多个class属性
*/
*{
color: red;
}
/*
通配选择器
语法:*
选中页面中所有元素
*/
</style>
<