[HTML&CSS] inherit
2020. 11. 27. 17:50ㆍHTML&CSS&JavaScript
inherit : 상속, 기본값(부모 엘리먼트의 값을 물려받음)
<inherit인 것> | <inherit 아닌 것> |
-color -font-size -font-weight -letter-spacing |
-display -background-color -border -margin -padding -width -height -border-radius |
<inherit 테스트>
<HTML>
----------------------
<br>
inherit인 것
<br>
-color
<br>
-font-size
<br>
-font-weight
<br>
-letter-spacing
<br>
----------------------
<br>
inherit 아닌 것
<br>
-display
<br>
-background-color
<br>
-border
<br>
-margin
<br>
-padding
<br>
-width
<br>
-height
<br>
-border-radius
<div>
div
<section>
section
</section>
<section>
section
</section>
</div>
<CSS>
div{
color:red;
font-size:2rem;
font-weight:bold;
letter-spacing:10px;
background-color:black;
border:10px solid red;
margin:20px;
padding:30px;
display:inline-block;
width:500px;
height:500px;
border-radius:50%;
}
div>section{
border:5px solid green;
border-radius
}
'HTML&CSS&JavaScript' 카테고리의 다른 글
[HTML&CSS] nav, ul, ol, li, a 등 개념 정리 (0) | 2020.11.27 |
---|---|
[HTML&CSS] body, a, ul, li 노멀라이즈 (0) | 2020.11.27 |
[HTML&CSS] inline grid (0) | 2020.11.26 |
[HTML&CSS] block 요소 좌측,가운데,우측 정렬하는 방법(feat.margin) (0) | 2020.11.26 |
[HTML&CSS] nth-child, first-child, last-child (0) | 2020.11.26 |