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
- 백엔드
- 비전공 개발자
- jQuery
- html5
- Animation
- button
- keyframes
- iPhone
- front-end
- effect
- iOS 개발자
- 프론트엔드
- IOS
- hover
- ipad
- react
- javascript
- 비전공자
- css3
- 풀스택
- CSS
- image
- 자바스크립트
- xcode
- SWIFT
- HTML
- MAC
- 개발자
- 애니메이션
- php
Archives
- Today
- Total
비전공자 개발일기
Growing Smiley Face Effects 본문
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>GROWING SMILEY FACE EFFECTS</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
<label>
<input type="radio" name="pink">
<div class="face"></div>
</label>
<label>
<input type="radio" name="green">
<div class="face"></div>
</label>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: 4px;
min-height: 100vh;
background-color: #222;
overflow: hidden;
}
:root {
--clr1: #FF0087;
--clr2: #01FF5F;
}
label {
position: relative;
width: 150px;
height: 150px;
}
label input {
appearance: none;
}
label .face {
position: absolute;
inset: 0;
background-color: #333;
border-radius: 50%;
cursor: pointer;
mix-blend-mode: lighten;
transition: .5s;
}
label input:checked ~ .face {
background: var(--clr1);
z-index: 1000;
filter: drop-shadow(0 0 50px var(--clr1)) drop-shadow(0 0 100px var(--clr1)) drop-shadow(0 0 150px var(--clr1));
}
label:nth-child(even) input:checked ~ .face {
background: var(--clr2);
z-index: 1000;
filter: drop-shadow(0 0 50px var(--clr2)) drop-shadow(0 0 100px var(--clr2)) drop-shadow(0 0 150px var(--clr2));
}
label .face::before {
content: '';
position: absolute;
top: 60px;
left: 45px;
width: 15px;
height: 15px;
background-color: #111;
opacity: .5;
border-radius: 50%;
box-shadow: 45px 0 0 #111;
}
label .face::after {
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 45px;
width: 40px;
height: 8px;
border-radius: 8px;
background-color: #111;
opacity: .5;
transition: .5s;
}
label input:checked ~ .face::after {
width: 40px;
height: 20px;
border-radius: 0;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
transform: translate(-50%, 10px);
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Gradient Circle Text (0) | 2022.09.15 |
---|---|
Christmas Tree (0) | 2022.09.13 |
Hover Effect (0) | 2022.09.10 |
Colorful Glowing Liquid Bowl (0) | 2022.09.09 |
Paper (0) | 2022.09.08 |