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 | 31 |
Tags
- html5
- 자바스크립트
- ipad
- 비전공자
- css3
- hover
- Animation
- jQuery
- SWIFT
- react
- 애니메이션
- MAC
- javascript
- 백엔드
- 풀스택
- HTML
- effect
- iOS 개발자
- keyframes
- IOS
- 비전공 개발자
- 개발자
- 프론트엔드
- php
- button
- iPhone
- image
- front-end
- xcode
- CSS
Archives
- Today
- Total
비전공자 개발일기
X-mas Background 본문
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>X-Mas BG</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="circle"></div>
<div class="snow">
<span style="--i: 11;"></span>
<span style="--i: 22;"></span>
<span style="--i: 24;"></span>
<span style="--i: 10;"></span>
<span style="--i: 14;"></span>
<span style="--i: 23;"></span>
<span style="--i: 18;"></span>
<span style="--i: 16;"></span>
<span style="--i: 19;"></span>
<span style="--i: 20;"></span>
<span style="--i: 22;"></span>
<span style="--i: 25;"></span>
<span style="--i: 18;"></span>
<span style="--i: 21;"></span>
<span style="--i: 13;"></span>
<span style="--i: 15;"></span>
<span style="--i: 26;"></span>
<span style="--i: 17;"></span>
<span style="--i: 13;"></span>
<span style="--i: 28;"></span>
<span style="--i: 11;"></span>
<span style="--i: 22;"></span>
<span style="--i: 24;"></span>
<span style="--i: 10;"></span>
<span style="--i: 14;"></span>
<span style="--i: 23;"></span>
<span style="--i: 18;"></span>
<span style="--i: 16;"></span>
<span style="--i: 19;"></span>
<span style="--i: 20;"></span>
<span style="--i: 22;"></span>
<span style="--i: 25;"></span>
<span style="--i: 18;"></span>
<span style="--i: 21;"></span>
<span style="--i: 13;"></span>
<span style="--i: 15;"></span>
<span style="--i: 26;"></span>
<span style="--i: 17;"></span>
<span style="--i: 13;"></span>
<span style="--i: 28;"></span>
</div>
</div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
position: relative;
}
body {
background: linear-gradient(#A2000A, #CF0000);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
width: 100%;
height: 100vh;
overflow: hidden;
}
.container::before {
content: '';
position: absolute;
bottom: 0;
width: 100%;
height: 200px;
background-image: url('tree.png');
z-index: 1;
}
.container .circle {
position: absolute;
top: 10%;
left: 50%;
transform: translateX(-50%);
width: 350px;
height: 350px;
background-color: #FFF;
border-radius: 50%;
}
.container .circle::before {
content: '';
position: absolute;
inset: -200px -300px;
background-image: url('santa.png');
background-position: center;
background-repeat: no-repeat;
background-size: 600px;
animation: animate 5s ease-in-out infinite;
}
@keyframes animate {
0%, 100% {
transform: translateY(-25px);
}
50% {
transform: translateY(25px);
}
}
.container .circle::after {
content: 'Happy Christmas';
position: absolute;
inset: -125px -200px;
font-size: 4em;
display: flex;
justify-content: center;
align-items: flex-end;
color: #FFF;
}
.container .snow {
display: flex;
}
.container .snow span {
min-width: 5px;
height: 5px;
background-color: #FFF;
border-radius: 50%;
margin: 0 1vw;
box-shadow: -100px 20px 5px #FFF, 100px 20px 10px #FFF;
animation: animate2 15s linear infinite;
animation-duration: calc(75s / var(--i));
}
.container .snow span:nth-child(2n) {
min-width: 10px;
height: 10px;
}
@keyframes animate2 {
0% {
transform: translateY(-10vh);
}
100% {
transform: translateY(100vh);
}
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Starbucks Landing Page (0) | 2023.01.02 |
---|---|
Happy New Year 2023 (0) | 2022.12.31 |
Number Fill Animation (0) | 2022.12.22 |
Noisy Grainy Icons (0) | 2022.12.21 |
Credit Card2 (0) | 2022.12.19 |