css实现炫酷按钮走光动画效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现炫酷按钮走光动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-height: 100vh;
background: #f8fafc;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Inter', sans-serif;
padding: 2rem;
}
.showcase {
max-width: 900px;
width: 100%;
text-align: center;
}
.header {
margin-bottom: 4rem;
}
.main-title {
font-size: 3rem;
font-weight: 700;
color: #1f2937;
margin-bottom: 1rem;
letter-spacing: 2px;
}
.description {
font-size: 1.2rem;
color: #6b7280;
font-weight: 400;
letter-spacing: 0.5px;
}
.button-collection {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2.5rem;
margin-bottom: 3rem;
}
.button-wrapper {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
.button-label {
color: #64748b;
font-size: 0.9rem;
font-weight: 500;
letter-spacing: 1px;
text-transform: uppercase;
}
.shine-button {
position: relative;
padding: 1.2rem 2.5rem;
font-size: 1.1rem;
font-weight: 600;
border: none;
border-radius: 12px;
cursor: pointer;
overflow: hidden;
transition: all 0.3s ease;
letter-spacing: 0.5px;
min-width: 200px;
}
.shine-button::before {
content: '';
position: absolute;
height: 250%;
width: 40px;
top: 0;
left: -60px;
background: linear-gradient(90deg, .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0