<body>
<div class="parent">
<div class="child"></div>
</div>
</body>
.parent {
width: 300px;
height: 400px;
background-color: red;
}
.child {
width: 100px;
height: inherit; /* 부모로부터 상속 */
background-color: orange;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.