css更多按钮样式
发表于:2023-01-16 16:27:51浏览:235次
图片
代码
<!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>
.select {
width: 100%;
position: relative;
}
.select-title {
width: 60px;
display: flex;
justify-content: space-between;
align-items: flex-start;
margin: 0 auto;
height: 50px;
}
.select-title span {
font-size: 18px;
color: #1788f2;
}
.select-title img {
display: block;
width: 20px;
height: 20px;
margin-top: 3px;
}
.select-content {
/* width: 100%; */
position: absolute;
background-color: #fff;
padding: 0;
top: 20px;
border-radius: 4px;
left: 50%;
display: none;
transform: translateX(-50%);
list-style: none;
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
}
.select-content li {
width: 100%;
/* height: 30px; */
padding: 8px 30px;
/* line-height: 30px; */
box-sizing: border-box;
display: block;
/* margin-top: 6px; */
text-align: left;
}
.select-content li:hover{
background-color: #f5f7fa
}
.select-content li a{
color: #333;
text-decoration: none;
font-size: 14px;
}
.select-title:hover .select-content {
display: block;
}
</style>
</head>
<body>
<div class="select">
<div class="select-title"><span>更多</span><img src="./select.png" alt="">
<ul class="select-content">
<li><a href="http://blog.dazijie.com/">查看群居成员</a></li>
<li><a href="http://blog.dazijie.com/">查看群组黑名单</a></li>
<li><a href="http://blog.dazijie.com/">发送rest消息</a></li>
<li><a href="http://blog.dazijie.com/">删除群组</a></li>
</ul>
</div>
</div>
</body>
</html>
栏目分类全部>