<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
.active {
position: relative;
width: 120px;
height: 50px;
border-radius: 50px;
background: lightseagreen;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.active::after {
content: '';
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
border-radius: 50px;
display: none;
background: rgba(0, 0, 0, 0.1);
}
.active:active::after {
display: block;
}
</style>
<body>
<div class="active">点击态</div>
</body>
</html>