3x3 그라데이션 코드
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Small Aurora Buttons</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background-color: #0f172a;
font-family: 'Pretendard', sans-serif;
}
.grid-container {
display: grid;
/* 화면 폭에 맞춰 3열 유지, 너무 작아지면 조절됨 */
grid-template-columns: repeat(3, minmax(100px, 120px));
gap: 12px; /* 간격도 조금 줄였습니다 */
padding: 15px;
}
.aurora-btn {
position: relative;
/* 크기를 150px -> 120px로 축소 */
width: 100%;
aspect-ratio: 1 / 1; /* 정사각형 유지 */
border: none;
border-radius: 12px;
cursor: pointer;
color: white;
font-size: 0.95rem; /* 글자 크기도 살짝 조정 */
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
text-decoration: none;
overflow: hidden;
background: linear-gradient(45deg, #ff00cc, #3333ff, #22ff12, #ff3300);
background-size: 400% 400%;
animation: gradientBG 8s ease infinite;
transition: transform 0.2s ease;
}
/* 오로라 테두리 효과 (더 얇게 조정) */
.aurora-btn::before {
content: '';
position: absolute;
top: -3px; left: -3px; right: -3px; bottom: -3px;
z-index: -1;
background: linear-gradient(45deg, #00d2ff, #3a7bd5, #00f2fe, #4facfe);
background-size: 400% 400%;
animation: gradientBG 4s ease infinite;
border-radius: 15px;
filter: blur(10px); /* 번짐 정도를 줄여서 더 깔끔하게 */
opacity: 0.6;
}
.aurora-btn:hover {
transform: translateY(-3px); /* 위로 살짝 올라가는 효과 */
}
@keyframes gradientBG {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.btn-text {
z-index: 1;
text-align: center;
word-break: keep-all; /* 단어 단위 줄바꿈 */
}
</style>
</head>
<body>
<div class="grid-container">
<a href="이동할_주소_1" class="aurora-btn">
<span class="btn-text">텍스트 1</span>
</a>
<a href="이동할_주소_2" class="aurora-btn">
<span class="btn-text">텍스트 2</span>
</a>
<a href="이동할_주소_3" class="aurora-btn">
<span class="btn-text">텍스트 3</span>
</a>
<a href="이동할_주소_4" class="aurora-btn">
<span class="btn-text">텍스트 4</span>
</a>
<a href="이동할_주소_5" class="aurora-btn">
<span class="btn-text">텍스트 5</span>
</a>
<a href="이동할_주소_6" class="aurora-btn">
<span class="btn-text">텍스트 6</span>
</a>
<a href="이동할_주소_7" class="aurora-btn">
<span class="btn-text">텍스트 7</span>
</a>
<a href="이동할_주소_8" class="aurora-btn">
<span class="btn-text">텍스트 8</span>
</a>
<a href="이동할_주소_9" class="aurora-btn">
<span class="btn-text">텍스트 9</span>
</a>
</div>
</body>
</html>