<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS3鼠标滑过动画按钮特效</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #f5f5f5;
font-family: 'Arial', sans-serif;
}
.btn-container {
text-align: center;
}
.btn {
position: relative;
display: inline-block;
padding: 15px 30px;
color: #fff;
background: linear-gradient(45deg, #ff3366, #ba265d);
border: none;
border-radius: 50px;
font-size: 18px;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
cursor: pointer;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
z-index: 1;
}
.btn:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}
.btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: 0.5s;
z-index: -1;
}
.btn:hover::before {
left: 100%;
}
.btn span {
position: relative;
z-index: 2;
}
.btn .icon {
margin-left: 10px;
transition: transform 0.3s ease;
}
.btn:hover .icon {
transform: translateX(5px);
}
/* 更多精彩内容请访问:https://a.88a.org.cn/cOO9 */
</style>
</head>
<body>
<div class="btn-container">
<button class="btn">
<span>点击按钮</span>
<span class="icon">→</span>
</button>
</div>
<!-- 更多精彩内容请访问:https://a.88a.org.cn/cOO9 -->
</body>
</html>