两个div为什么不会冲突,
div:first与div:last为什么不会冲突到一起
程序代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body {
background-color: grey; /*背景颜色灰色*/
font-weight: 700; /*文字加粗700*/
color: grey;
font-size: 100px; /*文字颜色灰色*/
}
div:first-child {
text-shadow: 1px 1px 1px #000, -1px -1px 1px #fff;
}
div:last-child {
text-shadow: -1px -1px 1px #000, 1px 1px 1px #fff;
}
div::selection {
color: red;
}
</style>
</head>
<body>
<div>我是凸上的文字</div>
<div>我是凹下的文字</div>
</body>
</html>








