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
- ipad
- HTML
- iPhone
- MAC
- 자바스크립트
- Animation
- 백엔드
- 비전공자
- 개발자
- react
- javascript
- xcode
- front-end
- html5
- button
- CSS
- iOS 개발자
- 비전공 개발자
- 애니메이션
- keyframes
- php
- css3
- effect
- IOS
- 프론트엔드
- 풀스택
- hover
- SWIFT
- jQuery
- image
Archives
- Today
- Total
비전공자 개발일기
Broken Effect 본문
728x90
SMALL

https://bennettfeely.com/clippy/
Clippy — CSS clip-path maker
About Clip Paths The clip-path property allows you to make complex shapes in CSS by clipping an element to a basic shape (circle, ellipse, polygon, or inset), or to an SVG source. CSS Animations and transitions are possible with two or more clip-path shape
bennettfeely.com
<!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>BROKEN EFFECT</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #222;
}
.box {
position: relative;
width: 400px;
height: 300px;
background-color: #FFF;
}
.box span {
position: absolute;
inset: 0;
transition: .5s;
background:url('./image2.jpg');
background-size: cover;
}
.box span:nth-child(1) {
clip-path: polygon(0 0, 50% 0%, 50% 50%, 0 50%);
transition-delay: 0;
}
.box span:nth-child(2) {
clip-path: polygon(50% 0, 100% 0, 100% 50%, 50% 50%);
transition-delay: .25s;
}
.box span:nth-child(3) {
clip-path: polygon(0 50%, 50% 50%, 50% 100%, 0 100%);
transition-delay: .5s;
}
.box span:nth-child(4) {
clip-path: polygon(50% 50%, 100% 50%, 100% 100%, 50% 100%);
transition-delay: .75s;
}
.box:hover span:nth-child(1) {
transform: translate(-40px, -60px) rotate(-15deg);
}
.box:hover span:nth-child(2) {
transform: translate(40px, -100px) rotate(25deg);
}
.box:hover span:nth-child(3) {
transform: translate(-40px, 80px) rotate(15deg);
}
.box:hover span:nth-child(4) {
transform: translate(40px, 80px) rotate(-15deg);
}728x90
LIST
'HTML _CSS' 카테고리의 다른 글
| Animated Login Form (0) | 2022.07.20 |
|---|---|
| Mordern Sidebar Menu (0) | 2022.07.19 |
| Progress Bar (0) | 2022.07.16 |
| Rainbow Button (0) | 2022.07.15 |
| CSS Focus (0) | 2022.07.14 |