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
- 자바스크립트
- keyframes
- CSS
- front-end
- xcode
- html5
- HTML
- javascript
- IOS
- button
- css3
- effect
- image
- MAC
- 비전공 개발자
- 애니메이션
- hover
- 개발자
- SWIFT
- iPhone
- php
- 풀스택
- ipad
- react
- Animation
- iOS 개발자
- 비전공자
- 백엔드
- 프론트엔드
- jQuery
Archives
- Today
- Total
비전공자 개발일기
CSS Tricky Shape 본문
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>CSS TRICKY SHAPE</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box">
<div class="circle"></div>
<div class="circle"></div>
</div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
position: relative;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #111;
}
.box {
width: 340px;
height: 200px;
display: flex;
}
.box .circle {
min-width: 200px;
height: 200px;
border: 25px solid #FFF;
border-radius: 50%;
}
.box .circle:nth-child(1)::before {
content: '';
position: absolute;
inset: -25px;
border: 25px solid transparent;
border-top: 25px solid #FFF;
border-right: 25px solid #FFF;
border-radius: 50%;
z-index: 100;
transform: rotate(-45deg);
}
.box .circle:nth-child(1)::after {
content: '';
position: absolute;
inset: -25px;
border: 25px solid transparent;
border-right: 25px solid #000;
border-radius: 50%;
z-index: 1;
transform: rotate(-65deg);
filter: blur(15px);
}
.box .circle:nth-child(2) {
left: -60px;
border: 25px solid #F00;
}
.box .circle:nth-child(2)::before {
content: '';
position: absolute;
inset: -25px;
border: 25px solid transparent;
border-bottom: 25px solid #F00;
border-left: 25px solid #F00;
border-radius: 50%;
z-index: 100;
transform: rotate(-45deg);
}
.box .circle:nth-child(2)::after {
content: '';
position: absolute;
inset: -25px;
border: 25px solid transparent;
border-left: 25px solid #000;
border-radius: 50%;
z-index: 1;
transform: rotate(-65deg);
filter: blur(15px);
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Infinite Ticker (0) | 2022.12.10 |
---|---|
3D Flip Product Card (0) | 2022.12.05 |
Input Label Animation (0) | 2022.11.28 |
Aspect Ratio Calculator (0) | 2022.11.27 |
Liquid Drop Login page (0) | 2022.11.26 |