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
- 백엔드
- react
- 자바스크립트
- effect
- CSS
- button
- iOS 개발자
- javascript
- MAC
- jQuery
- HTML
- hover
- IOS
- iPhone
- 비전공자
- 프론트엔드
- front-end
- 애니메이션
- keyframes
- ipad
- 비전공 개발자
- 개발자
- php
- xcode
- SWIFT
- image
- 풀스택
- Animation
- html5
- css3
Archives
- Today
- Total
비전공자 개발일기
Page Scroll 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>PAGE SCROLL EFFECTS</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<section>
<p style="color: red;">SCROLL</p>
<span class="curve">
<img src="curve.png">
</span>
</section>
<script>
let scroll = document.querySelector(".curve");
window.addEventListener("scroll", function() {
let val = 1 + window.scrollY / 1200;
scroll.style.transform = `scaleY(${val})`;
})
</script>
</body>
</html>
* {
margin: 0 ;
padding: 0;
}
body {
background-color: #111;
height: 200vh;
}
section {
position: absolute;
width: 100%;
height: 100%;
background: #2abbff;
}
section p{
font-size: 100px;
color: #6667ab;
text-align: center;
position: absolute;
top: 70%;
left: 39%;
z-index: 3;
}
section .curve {
width: 100%;
height: 200px;
position: absolute;
bottom: -200px;
transform-origin: top;
}
section .curve img {
width: 100%;
height: 100%;
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
RANGE SLIDER (0) | 2022.05.29 |
---|---|
Isometric Cards (0) | 2022.05.28 |
FILP CARD (0) | 2022.05.20 |
Isometric Menu Hover Effects (0) | 2022.05.19 |
Sprite Animation (0) | 2022.05.18 |