반응형

Hello, world! 251

CSS margin 마진 사방에 적용하기

1. DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> html { background-color: tomato; } body { margin: 20px; background-color: thistle; } div { margin-left: 50px; height: 150px; width: 150px; background-color: whitesmoke; } style> head> body> div>div> body>html> margin을 하나만 적으면 사방에 적용된다.   결과     2.DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> html { bac..

2. CSS 2024.11.17

CSS 박스의 특징 1. margin (마진)

margin은 box의 border(경계)의 바깥에 있는 공간이다.(box의 기본 디폴트 성질임)   1. DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> html { background-color: tomato; } div { height: 150px; width: 150px; background-color: whitesmoke; } style> head> body> body>html>     결과   검사    2.DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> html { background-color: tomato; } body { backgro..

2. CSS 2024.11.17

CSS <span> 태그 특징 (inline)

DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> div { height: 150px; width: 150px; background-color: tomato; } span { background-color: turquoise; } style> head> body> div>div> div>div> div>div> hello hello hello body>html>     결과 span 은 박스와 다르게 span 옆에 바로 다른 span이 올 수 있다. DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> div { height: 150px; width: 150px;..

2. CSS 2024.11.13
반응형