반응형

2024/11 80

CSS 특정 영역을 지정해서 변경하기

DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { height: 1000vh; margin: 50px; } span { color: tomato; } style> head> body> div> hello p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quod commodi e sequi ipsam odio dolorem. inside p> div> body>html>  결과  여기서 안에 있는 span을 바꾸려면 어떻게 해야 할까? DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> b..

2. CSS 2024.11.29

CSS nth-child() 사용하기 (even, odd, 3n+1)

기본 코딩DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { height: 1000vh; margin: 50px; } span { background-color: aquamarine; } style> head> body> span>hellospan> span>hellospan> span>hellospan> span>hellospan> span>hellospan> span>hellospan> body>html>  결과여기서 두번째, 네번째 span의 배경색을 다른 색으로 바꿔보자!DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { heigh..

2. CSS 2024.11.28

CSS pseudo selectors / first-child & last-child

pseudo selectors: 좀 더 세부적으로 엘리먼트를 선택해 주는 것!   기본 코딩DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { height: 1000vh; margin: 50px; } div { width: 300px; height: 300px; background-color: wheat; position: relative; } style> head> body> div>div> div>div> div>div> div>div> div>div> div>div> body>html>    결과  pseudo selectors 사용하기 (first-child & last-child)DOCTYPE html>html ..

2. CSS 2024.11.27

CSS position absolute 사용해서 div 박스 옮기기 이동

1. DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { height: 1000vh; margin: 50px; } div { width: 300px; height: 300px; background-color: wheat; } .green { background-color: teal; height: 100px; position: absolute; right: 0px; width: 100px; } style> head> body> div> div class="green">div> div> body>html>     결과          2. DOCTYPE html>html lang="kr"> head> title>The Ni..

2. CSS 2024.11.26
반응형