반응형

css 태그 7

CSS 특정 단어가 포함된 placeholder 꾸미기

placeholder에 "name" 이라는 단어를 포함한 모든 input의 배경색을 pink로 설정해보기 DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { height: 1000vh; margin: 50px; } input { border: 1px solid wheat; } input:required { border-color: tomato; } input[placeholder~="name"] { background-color: pink; } style> head> body> div> form> input type="text" placeholder="First name" /> input type="text" placeh..

2. CSS 2024.11.29

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