📝 노트로 돌아가기
이전글 2024.12.18 [html, css]
다음글 2024.12.23 [html, css]
GSAP __ fullpage scroll event
See the Pen 실무 팁 - 특정 구간에서 스크롤시, 횡으로 이동하는 효과 2부 by se.eun (@se-eun) on CodePen.
원하는 페이지로 이동하는 버튼 만들기
id 태그를 달아 이름을 붙여준후, a태그의 href=" "값에 id 값을 넣어주면 그 id의 위치로 이동하게 된다.
부드러운 화면 이동을 위해
html{ scroll-behavior: smooth; }
코드를 달아준다.
** 부드럽게 적용이 되지않을경우 body에도 달아볼것!
background-attachment:fixed
background-attachment:fixed 를 사용하면, 스크롤시에 페이지와같이 이미지가 스크롤 되지않고
화면에 고정되어 보여진다
참고하면 좋은 관련 포스트
https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment
background-attachment - CSS: Cascading Style Sheets | MDN
The background-attachment CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block.
developer.mozilla.org
라이브러리 없이 풀페이지 효과 만들기
scroll-snap-align: start; 로 기준점을 만들어준 후
scroll-snap-type: y mandatory;으로 효과 설정
차례대로 나타나는 글자 만들기
'📝 study > html, css, javascript' 카테고리의 다른 글
| 2024.12.24 [html, css, javascript] 애니메이션 라이브러리/animate library (2) | 2024.12.24 |
|---|---|
| 2024.12.23 [html, css, javascript] 스와이퍼, swiper (1) | 2024.12.23 |
| 2024.12.18 [html, css, javascript] 스와이퍼, swiper 사용하기 (2) | 2024.12.18 |
| 2024.12.17 [html, css, javascript] html 실무 기능 (1) | 2024.12.17 |
| 2024.12.16 [html, css, javascript] 간단한 header기능 (2) | 2024.12.16 |
