Notice
Recent Posts
Recent Comments
ยซ   2024/11   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
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
Archives
Today
In Total
๊ด€๋ฆฌ ๋ฉ”๋‰ด

A Joyful AI Research Journey๐ŸŒณ๐Ÿ˜Š

JavaScript: fade ํšจ๊ณผ AOS ์• ๋‹ˆ๋ฉ”์ด์…˜ ์“ฐ๊ธฐ ๋ณธ๋ฌธ

๐Ÿ’ปBootcamp Self-Study Revisionโœจ/JavaScript, jQuery, Ajax

JavaScript: fade ํšจ๊ณผ AOS ์• ๋‹ˆ๋ฉ”์ด์…˜ ์“ฐ๊ธฐ

yjyuwisely 2023. 4. 22. 16:43

HTML ํŒŒ์ผ์— <body> ํƒœ๊ทธ๊ฐ€ ๋๋‚˜๊ธฐ ์ „์— ์•„๋ž˜ JS ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init();
</script>

<head>์•„๋ž˜ CSS ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">

 

์• ๋‹ˆ๋ฉ”์ด์…˜ ํšจ๊ณผ๊ฐ€ ์žˆ์„ ๋‚ด์šฉ์— ์•„๋ž˜ ์ฝ”๋“œ๋กœ ๋ฌถ๋Š”๋‹ค. ๋‚˜๋Š” ์˜ค๋ฅธ์ชฝ์—์„œ ๋‚˜์˜ค๋Š” ์• ๋‹ˆ๋ฉ”์ด์…˜(fade-right)์„ ๊ณจ๋ž๋‹ค.

<div data-aos="fade-right">
<!-- contents -->
</div>

์•„๋ž˜ ์˜ˆ์‹œ ๋งํฌ์—์„œ ์••์ถ• ํŒŒ์ผ์„ ๋‹ค์šด ๋ฐ›์•„์„œ aos.css์™€ aos.js๋ฅผ ์“ฐ๋ฉด ๋œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  aos.js์— ๊ฒฝ๋กœ ์ˆ˜์ •์„ ํ•œ๋‹ค.

import '../css/aos.css';

 

์˜ˆ์‹œ ๋งํฌ)
https://michalsnik.github.io/aos/

 

AOS - Animate on scroll library

AOS Animate On Scroll Library Scroll down

michalsnik.github.io

์›์ž‘์ž ๊นƒํ—ˆ๋ธŒ ๋งํฌ)
์‚ฌ์šฉ ์„ค๋ช…์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

https://github.com/michalsnik/aos

 

GitHub - michalsnik/aos: Animate on scroll library

Animate on scroll library. Contribute to michalsnik/aos development by creating an account on GitHub.

github.com


728x90
๋ฐ˜์‘ํ˜•
Comments