CSS的复合选择器之链接伪类选择器下
<!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>CSS的复合选择器之链接伪类选择器</title>
<style>
body {
color: red;
}
/* 因为a链接在浏览器中具有默认样式,给body改颜色不会改变a的颜色,需要单独给a改颜色 */
a {
color: red;
}
</style>
</head>
<body>
<a href="#">小猪佩奇</a>
</body>
</html>