按钮—按钮点击特效
程序员文章站
2022-06-09 17:01:57
...
按钮—按钮点击特效
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>点击特效</title>
<style>
div#btn {
position: fixed;
top : 200px;
left: 200px;
width: 70px;
height: 20px;
border: 1px solid #262626;
border-radius: 5px;
text-align: center;
user-select: none;
}
div#btn:hover {
background-color: #262626;
color: #fff;
}
div#btn::before {
content: '';
position: absolute;
top: -1px;
left: -1px;
width: 100%;
height: 100%;
background: transparent;
border: 1px solid #262626;
border-radius: 5px;
border-radius: 5px;
}
div#btn:hover::before {
transform: scale(1.2, 1.4);
opacity: 0;
transition: .8s;
}
</style>
</head>
<body>
<div id='btn'>
Button
</div>
</body>
</html>
上一篇: CSS+JS实现水滴涟漪动画按钮
下一篇: 加载so文件