HTML, CSS
(22)CSS_상속
빠스무
2023. 3. 29. 17:45
728x90
- CSS 상속 예제
- 사용하는 태그에 관한 문법 설명은 아래 링크로 가서 확인 가능하다.
- https://jm-rograming.tistory.com/54
(15)CSS_기본 문법
CSS(Cascading Style Sheets) 웹 페이지의 특정 요소 또는 그룹에 적용할 스타일 그룹을 지정하는 규칙을 정의하는 언어 ✔ 참고 MDN: https://developer.mozilla.org/ko/ MDN Web Docs The MDN Web Docs site provides information a
jm-rograming.tistory.com
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>상속</title>
<style>
div{
color: deeppink;/*상속 됨*/
border: 3px dotted gold;/*상속 안됨*/
padding: 30px;/*상속 안됨*/
}
</style>
</head>
<body>
<h2>상속</h2>
<div>
div영역
<h3>상속이란</h3>
<p>부모 요소의 속성값이 자식 요소에게 전달되는 속성</p>
</div>
</body>
</html>