
#3.16 Pseudo Selectors part Two이전 포스트/코코아 html css2020. 12. 11. 19:43
Table of Contents
태그 + 태그는 바로옆에 있는 형제태그만 스타일을 적용하지만
태그~태그는 사이에 다른 태그가 와도 뛰어넘고 스타일을 적용함
<!DOCTYPE html>
<html lang="kr">
<head>
<title>title</title>
<style>
body {
background-color: tomato;
height: 100vh;
}
span {
background-color: wheat;
}
p ~ span {
background-color: teal;
}
</style>
</head>
<body>
<span>hello</span>
<p>what's mean to lose a <span>thing</span> you really want to stay</p>
<address>secoul</address>
<span>last</span>
</body>
</html>
attribute selector에 대해서 배움.
developer.mozilla.org/ko/docs/Web/CSS/Attribute_selectors
특성 선택자
CSS 특성 선택자는 주어진 특성의 존재 여부나 그 값에 따라 요소를 선택합니다.
developer.mozilla.org
여기 참조
'이전 포스트 > 코코아 html css' 카테고리의 다른 글
#3.18 Recap (0) | 2020.12.11 |
---|---|
#3.17 States (0) | 2020.12.11 |
#3.15 Combinators (0) | 2020.12.10 |
#3.14 Pseudo Selectors part One (0) | 2020.12.10 |
#3.13 Relative Absolute (0) | 2020.12.10 |

@병고라니 :: 컴퓨터공학과 고인물
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!