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
- xcode
- button
- html5
- effect
- 비전공자
- iOS 개발자
- 개발자
- 백엔드
- HTML
- ipad
- MAC
- 자바스크립트
- react
- front-end
- hover
- IOS
- 프론트엔드
- 비전공 개발자
- CSS
- jQuery
- SWIFT
- iPhone
- keyframes
- javascript
- css3
- image
- Animation
- 풀스택
- 애니메이션
- php
Archives
- Today
- Total
비전공자 개발일기
Unfold CSS Effect 본문
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>UNFOLD CSS EFFECTS</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box">
<span style="--i:0;"></span>
<span style="--i:1;"></span>
<span style="--i:2;"></span>
<span style="--i:3;"></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: #2F364F;
}
.box {
width: 640px;
height: 360px;
display: flex;
transform: rotate(-25deg) skew(25deg);
transition: .5s;
}
.box:hover {
transform: rotate(-25deg) skew(-25deg) translateY(-20px);
}
.box span {
width: 25%;
height: 100%;
background-image: url('img.jpg');
background-size: cover;
background-position: calc(-120px * var(--i));
display: block;
transition: .5s;
pointer-events: none;
border-top: 5px solid #FFF;
border-bottom: 5px solid #FFF;
}
.box:hover span:nth-child(odd) {
transform: skewY(25deg);
box-shadow: inset 20px 0 50px rgba(0, 0, 0, .5);
}
.box:hover span:nth-child(even) {
transform: skewY(-25deg);
box-shadow: inset 20px 0 50px rgba(0, 0, 0, .5);
}
.box span:first-child {
border-left: 5px solid #FFF;
}
.box span:last-child {
border-right: 5px solid #FFF;
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Credit card (0) | 2022.10.30 |
---|---|
3D Neon Cube (0) | 2022.10.28 |
SOLAR Eclipse (0) | 2022.10.26 |
Abstract BG Generator with anime.js (0) | 2022.10.25 |
Light 3D Cube (0) | 2022.10.24 |