반응형

CSS 독학 17

CSS media query

media query 란?오직 CSS 만을 이용해서 스크린의 사이즈를 알 수 있는 방법이다.   DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { display: flex; height: 100vh; align-items: center; justify-content: center; } div { background-color: teal; width: 200px; height: 200px; } @media screen and (max-width: 600px;) { div { background-color: tomato; } } style> head> body> div>div> body>html> 해석: 스크린이 600px..

2. CSS 2024.12.09

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
반응형