弹出菜单的实现原理
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.item{
background-color: blanchedalmond;
}
/*鼠标放上去之后里面字体颜色变成红色的*/
.item:hover{
color: red;
}
/*放上去的时候改变了b里面的标签属性*/
.item:hover .b{
color: #3bae56;
}
</style>
</head>
<body>
<div class="item">
<div class="a">123</div>
<div class="b">4456</div>
</div>
</body>
</html>

浙公网安备 33010602011771号