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 | 29 | 30 |
Tags
- CSS
- jQuery
- 개발자
- css3
- hover
- html5
- react
- keyframes
- php
- 백엔드
- 자바스크립트
- MAC
- SWIFT
- iOS 개발자
- 애니메이션
- 비전공 개발자
- effect
- iPhone
- HTML
- button
- Animation
- javascript
- xcode
- 프론트엔드
- image
- front-end
- 풀스택
- ipad
- IOS
- 비전공자
Archives
- Today
- Total
비전공자 개발일기
3D Animated Stairs 본문
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>3D ANIMATED STAIRS</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="stairs">
<div class="base"></div>
<div class="step" style="--j:1;">
<i></i>
<i></i>
</div>
<div class="step" style="--j:2;">
<i></i>
<i></i>
</div>
<div class="step" style="--j:3;">
<i></i>
<i></i>
</div>
<div class="step" style="--j:4;">
<i></i>
<i></i>
</div>
<div class="step" style="--j:5;">
<i></i>
<i></i>
</div>
<div class="step" style="--j:6;">
<i></i>
<i></i>
</div>
</div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: radial-gradient(#EAC4FF, #9E57C5);
overflow: hidden;
}
.stairs {
position: relative;
width: 500px;
height: 300px;
transform-style: preserve-3d;
transform: rotateX(-30deg) rotateY(250deg) ;
animation: animate 10s linear infinite;
}
@keyframes animate {
0% {
transform: rotateX(-30deg) rotateY(0);
}
100% {
transform: rotateX(-30deg) rotateY(360deg);
}
}
.stairs .base {
position: absolute;
top: 0;
left: 60px;
width: 360px;
height: 300px;
background-color: #A54BCF;
transform: rotateX(90deg) translateZ(-150px) scale(1.25);
filter: blur(20px);
opacity: .5;
}
.stairs .step {
position: absolute;
left: calc(60px * var(--j));
bottom: 0;
width: 60px;
height: calc(60px * var(--j));
transform-style: preserve-3d;
}
.stairs .step::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 60px;
height: 300px;
background-color: #CF8DF1;
transform: rotateX(90deg) translateZ(150px);
}
.stairs .step:hover::before {
filter: brightness(1.1);
cursor: pointer;
}
.stairs .step::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 300px;
height: 60px;
background-color: #AE52DD;
transform: rotateY(90deg) translateZ(-150px);
}
.stairs .step i {
position: absolute;
display: block;
width: 60px;
height: 100%;
background-color: #A54BCF;
transform-style: preserve-3d;
}
.stairs .step i:nth-child(1) {
transform: translateZ(150px);
}
.stairs .step i:nth-child(2) {
transform: translateZ(-150px);
}
.stairs .step:last-child i:nth-child(2)::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 300px;
height: 100%;
background: #AE52DD;
transform: rotateY(90deg) translate3d(-150px, 0, -90px);
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Lock Mobile Screen Shot (0) | 2022.08.29 |
---|---|
Lamp Animation (0) | 2022.08.27 |
QR Code Scanning (0) | 2022.08.22 |
Responsive Pricing Table (0) | 2022.08.20 |
Navigation Tabs Menu Design (0) | 2022.08.19 |