250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- react
- 애니메이션
- 프론트엔드
- 비전공자
- button
- Animation
- 백엔드
- php
- 풀스택
- html5
- javascript
- xcode
- keyframes
- jQuery
- hover
- image
- 개발자
- iPhone
- HTML
- effect
- front-end
- MAC
- 비전공 개발자
- ipad
- SWIFT
- CSS
- IOS
- css3
- 자바스크립트
- iOS 개발자
Archives
- Today
- Total
비전공자 개발일기
Light 3D Cube 본문
728x90
SMALL
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GLOW EFFECT</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<section>
<div class="box">
<div class="cube">
<div class="top"></div>
<div>
<span style="--i:0;"></span>
<span style="--i:1;"></span>
<span style="--i:2;"></span>
<span style="--i:3;"></span>
</div>
</div>
</div>
</section>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #1D0035;
min-height: 100vh;
overflow: hidden;
}
section {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
transform-style: preserve-3d;
transform: perspective(700px);
}
.box {
position: absolute;
transform-style: preserve-3d;
top: 125px;
}
.box .cube {
position: relative;
width: 200px;
height: 200px;
transform-style: preserve-3d;
animation: animateCube 20s linear infinite;
}
@keyframes animateCube {
0% {
transform: rotateY(0deg);
}
100% {
transform: rotateY(360deg);
}
}
.box .cube div {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform-style: preserve-3d;
}
.box .cube div span {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(#FB6200, #FB6200, #C3300F);
transform: rotateY(calc(90deg * var(--i))) translateZ(100px);
}
.box .cube .top {
position: absolute;
top: 0;
left: 0;
width: 200px;
height: 200px;
background-color: #B22708;
transform: rotateX(90deg) translateZ(100px);
display: flex;
justify-content: center;
align-items: center;
}
.box .cube .top::before {
content: '';
position: absolute;
width: 400px;
height: 400px;
background-color: #FB6200;
transform: translateZ(-400px);
box-shadow: 0 0 120px rgba(251, 98, 0, .2),
0 0 200px rgba(251, 98, 0, .4),
0 0 300px rgba(251, 98, 0, .6),
0 0 400px rgba(251, 98, 0, .8),
0 0 500px rgba(251, 98, 0, 1);
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
SOLAR Eclipse (0) | 2022.10.26 |
---|---|
Abstract BG Generator with anime.js (0) | 2022.10.25 |
Candle Animation (0) | 2022.10.22 |
Box Card Hover Effects (0) | 2022.10.21 |
Task Dashboard (0) | 2022.10.20 |