반응형

2024/11/30 9

CSS selection (문구 드래그 시 색상 변경하기)

DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { height: 1000vh; margin: 50px; } p::selection { background-color: yellowgreen; } style> head> body> p>안녕하세요 반갑습니다. CSS 독학 독하게 하는 중입니다.p> body>html>      결과문구를 드래그하면 yellowgreen으로 바뀜ㅋㅋ 오.. 신기해   (참고)https://developer.mozilla.org/en-US/docs/Web/CSS/::selection

2. CSS 2024.11.30

CSS visited, hover, focus 동시에 사용하기

DOCTYPE html>html lang="kr"> head> title>The Nick Timestitle> style> body { height: 1000vh; margin: 50px; } a:visited { color: tomato; } a:hover { color: teal; } a:focus { color: turquoise; } style> head> body> a href="https://appl.com">Go to applea> body>html>    결과   마우스 오버 시: teal 색상으로 변경마우스 클릭 시: turquoise 색상으로 변경클릭 후 새로고침 시:  tomato 색상으로 변경

2. CSS 2024.11.30
반응형