下拉菜单
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0px;
padding: 0px;
border: 0px;
}
.one {
border: 1px solid red;
width: 100px;
height: 200px;
float: left;
}
.one p {
display:none;
background-color: burlywood;
width: 200px;
}
.one p:hover {
color: chartreuse;
background-color: cornflowerblue;
}
.one a {
display: block;
background-color: rgb(229, 52, 245);
font-size: 40px;
}
***## one中的a属性添加鼠标移动到a上变色效果***
.one a:hover {
color: chartreuse;
background-color: cornflowerblue;
}
.one:hover p {
display: block;
}
.two {
border: 1px solid red;
width: 100px;
height: 52px;
float: left;
}
.two p {
display:none;
background-color: rgb(0, 247, 41);
}
.two p:hover {
color: chartreuse;
background-color: cornflowerblue;
}
.two a {
display: block;
background-color: rgb(229, 52, 245);
font-size: 40px;
}
.two a:hover {
color: chartreuse;
background-color: cornflowerblue;
}
.two:hover p {
display: block;
}
</style>
</head>
<body>
<div class="one">
<a>就是</a>
<p>是吗</p>
<p>安装</p>
<p>也许</p>
</div>
<div class="two">
<a>就是</a>
</div>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/d351a180caa8354acf9cbc5551cc7aba.png)