반응형

Hello, world! 251

CSS flex box(플렉스 박스)의 특징2

- 주축(main axis)과 교차축(cross axis)                                      ㄴ교차축은 일반적으로 수직임 (바뀔 수도 있음) - justify-content: 주축에 적용됨- align-items: 교차축에 적용됨 (참고)100 vh : vh 는 viewport height 다 (viewport는 screen 이라고 생각해도 된다)==> 100 screen height는 화면 높이의 100%를 뜻함 DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { height: 100vh; margin: 20px; display: flex; justify-content: space-bet..

2. CSS 2024.11.19

CSS inline-block 태그 사용하기

inline-block은 1. 브라우저가 block으로 인식함.2. 높이를 가질 수 있음.3. 사방에 margin도 가질 수 있음.4. 바로 옆에 다른 요소가 올 수도 있음.5. but, 반응형 디자인을 지원하지 않는다.DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { margin: 20px; } div { display: inline-block; width: 50px; height: 50px; background-color: teal; } style> head> body> body>html>     결과

2. CSS 2024.11.19

CSS Class(클래스) 적용하기

Class명은 유일할 필요가 없다.그리고 여러 요소들을 같이 쓸 수 있고, 한 번에 여러 class가 쓰일 수 있다. DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { margin: 20px; } span { background-color: teal; } .tomato { background-color: tomato; } style> head> body> span>hellospan> hello span>hellospan> hello span>hellospan> hello span>hellospan> body>html>  결과칙칙폭폭 귀여운 기차같아

2. CSS 2024.11.18

CSS inline의 margin(마진)은 좌우로만 가질 수 있다.

(복습) span은 inline 속성을 가진다.inline은 높이와 너비를 가질 수 없다. inline의 margin은 좌우로만 가질 수 있다. DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { margin: 20px; } span { background-color: teal; padding: 20px; margin: 30px; } style> head> body> hello hello body>html>   결과   결론1. inline은 높이와 너비를 가질 수 없다.2. 대표적인 inline 태그로는 span이 있다.3. span 에 margin을 적용하면 위 아래에는 적용이 되지 않고 좌우에만 적용된다.4. spa..

2. CSS 2024.11.18
반응형