๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

transition5

HTML & CSS ํ™œ์šฉ ํ”„๋กœ์ ํŠธ_ ์นด๋“œ์…”ํ”Œ & ๋””์ŠคํŽœ์‹ฑ ์ฝ”๋“œ .container{ width: 500px; height: 500px; border: 1px solid #000; position: relative; } .box{ width: 100px; height: 130px; border: 1px solid #000; border-radius: 5px; position: absolute; top: 35%; left: 40%; } .btn{ width: 50px; height: 50px; border: 1px solid #000; } .box1{ background: crimson; z-index: 1; } .box2{ background: darkorange; z-index: 0; } .box3{ background:gold; z-index: 0; } .b.. 2022. 1. 28.
CSS _transition(2) (timing-function) ์ €๋ฒˆ์— ์ด์–ด์„œ transition ๋‘ ๋ฒˆ์งธ timing-function์„ ์•Œ์•„๋ณด์•˜๋‹ค. timing-function ์ „ํ™˜ํšจ๊ณผ์˜ ์‹œ๊ฐ„๋‹น ์†๋„๋ฅผ ์กฐ์ •ํ•œ๋‹ค. ๊ฐ’์˜ ์ข…๋ฅ˜ 1. ease : ๊ธฐ๋ณธ๊ฐ’ / ์ ์  ์†๋„๊ฐ€ ์ฆ๊ฐ€ํ•˜๋‹ค๊ฐ€ ๋Š๋ ค์ง 2. linear : ๋˜‘๊ฐ™์€ ์†๋„๋กœ ๋๊นŒ์ง€ 3. ease-in : ์ฒœ์ฒœํžˆ ์‹œ์ž‘ํ•˜์—ฌ ๋๋‚ ๋•Œ๊นŒ์ง€ ๋นจ๋ผ์ง 4. ease-out : ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•ด์„œ ๋Š๋ ค์ง€๋ฉฐ ๋ 5. ease-in-out : ์ฒœ์ฒœํžˆ ์‹œ์ž‘ํ•ด์„œ ๋นจ๋ผ์กŒ๋‹ค๊ฐ€ ๋‹ค์‹œ ๋Š๋ ค์ง 6. steps(๋‹จ๊ณ„ ์ˆ˜, jump-term) 7. step-start : steps(1, start)์™€ ๋™์ผ 8. step-end : steps(1, end)์™€ ๋™์ผ 9. cubic-bezier(p1, p2, p3, p4) : ๋ฒ ์ง€์–ด ๊ณก์„  1~5๊นŒ์ง€ ๋ชจ๋‘ ๋ฒ ์ง€์–ด ๊ณก์„ .. 2022. 1. 14.
CSS _transition(1) (property, timing, delay) ์ €๋ฒˆ์— css๊ฐ€์ƒํด๋ž˜์Šค hover๋ฅผ ์•Œ์•„๋ณผ ๋•Œ ์ž ์‹œ ๋‹ค๋ค˜๋˜ transition์— ๋Œ€ํ•ด์„œ ์ข€ ๋” ๊ณต๋ถ€ํ•ด๋ณด์•˜๋‹ค. transition = ๋ณ€๊ฒฝ ์ด๋‹ค. ๋”ฐ๋ผ์„œ ์š”์†Œ์˜ ์ƒํƒœ ๋ณ€ํ™”๋ฅผ ๋‹ค๋ฃฐ ์ˆ˜ ์žˆ๋Š”๋ฐ transition์€ ๋‹จ์ถ• ์†์„ฑ์ด๊ณ  property, duration, delay, timing-function ์ด๋ ‡๊ฒŒ 4๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค. ๊ฐ๊ฐ์„ ๊ฐ„๋‹จํžˆ ์•Œ์•„๋ณด๋ฉด 1. property : ๋ณ€ํ™”๋ฅผ ์ ์šฉ์‹œํ‚ฌ CSS ์†์„ฑ ์ง€์ • 2. duration : ๋ณ€ํ™”์‹œ๊ฐ„ ์ง€์ • 3. delay : ์ง€์—ฐ ์‹œ๊ฐ„ ์ง€์ • (์‹œ๊ฐ„ ์ง€๋‚œ ํ›„ ์‹œ์ž‘) 4. timing-function : ๋ณ€ํ™”๋˜๋Š” ๊ณผ์ • ์ค‘ ์†๋„ ์ง€์ • property & duration div:hover { transition-property: width; transition-duration.. 2022. 1. 14.
CSS ๊ฐ€์ƒํด๋ž˜์Šค (1)-2_๋งˆ์šฐ์Šค ์˜ค๋ฒ„ ํšจ๊ณผ(hover, transition) ์ถ”๊ฐ€! hover์™€ transition์„ ๊ฐ€์ง€๊ณ  ๋†€๋‹ค๊ฐ€ transition์— width์™€ height์˜ ์†๋„๋ฅผ ๋‹ค๋ฅด๊ฒŒ ์ ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์„ ๋ฐœ๊ฒฌํ–ˆ๋‹ค. .parent { width: 400px; height: 200px; position: relative; } .child { position: absolute; width: 25px; height: 25px; top: 50%; left: 50%; transform: translate(-50%,-50%); background-color: blueviolet; transition: width 0.95s, height 1s; } .child:hover { width: 100%; height: 100%; background-color: rgb(216, 179, 250);.. 2022. 1. 7.
CSS ๊ฐ€์ƒํด๋ž˜์Šค (1)_๋งˆ์šฐ์Šค ์˜ค๋ฒ„ ํšจ๊ณผ(hover, transition) ๋งˆ์šฐ์Šค๊ฐ€ ์˜ฌ๋ผ๊ฐ”์„ ๋•Œ ๋ณ€ํ™”๋ฅผ ์ฃผ๋Š” ๊ฐ€์ƒํด๋ž˜์Šค์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด์ž hover aํƒœ๊ทธ๋กœ hover๋ฅผ ํ™œ์šฉํ•ด๋ณด์•˜๋‹ค. ๋“ค์–ด๊ฐ€๊ธฐ์ „์— aํƒœ๊ทธ ๊ด€๋ จ ์•Œ์•„๋‘˜ ๊ฒƒ 1. href ์†์„ฑ์„ ๋น„์›Œ๋‘๋ฉด jQuery๊ฐ€ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š”๋‹ค. -> #none์„ ๋„ฃ์–ด์ฃผ์ž! 2. body์˜ ์ƒ‰์ƒ ์†์„ฑ์„ ์ ์šฉ๋ฐ›์ง€ ์•Š๋Š”๋‹ค. ์‚ฌ์šฉ๋ฒ• ์„ ํƒ์ž:hover ์œ„์ฒ˜๋Ÿผ ์„ ํƒ์ž ๋’ค์— ๊ฐ€์ƒํด๋ž˜์Šค๋ฅผ ์ ์–ด์ฃผ๋ฉด ๋˜๋Š”๋ฐ ์„ ํƒ์ž์™€ ๊ฐ€์ƒํด๋ž˜์Šค ์‚ฌ์ด์— ๋„์–ด์“ฐ๊ธฐ๊ฐ€ ์žˆ์œผ๋ฉด ์•ˆ๋œ๋‹ค! ์˜ˆ์‹œ1 ๊ณต์ง€์‚ฌํ•ญ Q&A ์ปค๋ฎค๋‹ˆํ‹ฐ body { background-color: #fff; color: #333; font-size: 15px; } a { color: #333; text-decoration: none; font-weight: 700; transition: 0.3s; } a:hover { .. 2022. 1. 7.
๋ฐ˜์‘ํ˜•