.btn {
display: inline-block;
padding: 12px 24px;
background-color: #3498db;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
text-decoration: none;
}
.btn {
background: linear-gradient(135deg, #3498db, #2980b9);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
transition: all 0.3s ease;
}
.btn:hover {
background: linear-gradient(135deg, #2980b9, #1c5a85);
box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
/ 基础按钮样式 / .btn {
padding: 12px 24px;
font-size: 16px;
border-radius: 6px;
}
/ 平板设备 / @media (max-width: 768px) {
.btn {
padding: 14px 28px;
font-size: 18px;
}
}
/ 手机设备 / @media (max-width: 480px) {
.btn {
padding: 16px 32px;
font-size: 20px;
border-radius: 8px;
}
}
.btn-feedback {
transition: all 0.2s ease;
position: relative;
overflow: hidden;
}
.btn-feedback:active {
transform: translateY(2px);
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.btn-feedback:focus {
outline: 2px solid #4dabf7;
outline-offset: 2px;
}
/ 涟漪效果 / .btn-feedback::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
border-radius: 50%;
background: rgba(255,255,255,0.5);
transform: translate(-50%, -50%);
transition: width 0.3s, height 0.3s;
}
.btn-feedback:active::after {
width: 100px;
height: 100px;
}
/ 购买按钮 - 高转化率设计 / .btn-purchase {
background: linear-gradient(135deg, #ff6b6b, #ee5a24);
color: white;
padding: 14px 28px;
border-radius: 8px;
font-weight: 600;
font-size: 16px;
box-shadow: 0 4px 12px rgba(238, 90, 36, 0.3);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.btn-purchase:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(238, 90, 36, 0.4);
}
.btn-purchase:active {
transform: translateY(0);
box-shadow: 0 2px 8px rgba(238, 90, 36, 0.3);
}
/ 限时抢购特效 / .btn-flash-sale::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
transform: rotate(45deg);
animation: shine 3s infinite;
}
@keyframes shine {
0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}