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
- 프론트엔드
- effect
- javascript
- jQuery
- Animation
- IOS
- xcode
- 개발자
- 비전공자
- button
- ipad
- iOS 개발자
- react
- 자바스크립트
- hover
- php
- 비전공 개발자
- 백엔드
- css3
- image
- 풀스택
- keyframes
- iPhone
- front-end
- CSS
- html5
- MAC
- HTML
- 애니메이션
- SWIFT
Archives
- Today
- Total
비전공자 개발일기
Love Animation 본문
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>LOVE Animation</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="love">
<input type="checkbox" name="" id="">
<span></span>
<span></span>
<span></span>
<p></p>
</div>
</body>
</html>
body {
background-color: black;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.love {
position: relative;
width: 50px;
height: 50px;
}
p::after {
position: absolute;
width: 50px;
height: 50px;
content: "I LOVE";
font-size: 5px;
font-weight: 700;
top: 10px;
left: 1px;
transition: all .5s ease-in-out;
}
.love span {
position: absolute;
width: 30px;
height: 30px;
background-color: #00dd5f;
transition: all .5s ease-in-out;
}
.love input {
position: absolute;
width: 50px;
height: 50px;
margin: 0;
opacity: 0;
cursor: pointer;
z-index: 9;
}
.love input:checked~span:nth-child(2) {
background-color: #d40000;
border-radius: 50%;
left: 0;
z-index: 1;
animation: effects .5s linear alternate;
}
.love input:checked~span:nth-child(3) {
background-color: #d40000;
border-radius: 50%;
left: 20px;
z-index: 1;
animation: effects .5s linear alternate;
}
.love input:checked~span:nth-child(4) {
background-color: #d40000;
top: 10px;
left: 10px;
transform: rotate(45deg);
animation: effects .5s linear;
}
.love input:checked~p:after {
content: "YOU";
letter-spacing: 3px;
color: #fff;
z-index: 1;
top: 15px;
left: 13px;
}
@keyframes effects {
100% {
transform: rotate(360deg);
}
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Neon Text Glow Animation (0) | 2022.05.01 |
---|---|
Scanner Animation (0) | 2022.04.30 |
Profile Card (0) | 2022.04.28 |
Endless Road Animation (0) | 2022.04.26 |
Gradient Background Animation (0) | 2022.04.25 |