HTML:
<div class="fb3 building-wrap">
<div class="fb3a window-wrap">
<div class="fb3-window"></div>
<div class="fb3-window"></div>
<div class="fb3-window"></div>
</div>
<div class="fb3b"></div>
<div class="fb3a"></div>
<div class="fb3b"></div>
</div>
CSS:
:root {
--building-color1: #aa80ff;
--window-color1: black;
}
.fb3 {
width: 10%;
height: 35%;
}
.fb3a {
width: 80%;
height: 15%;
background-color: var(--building-color1);
}
.fb3b {
width: 100%;
height: 35%;
background-color: var(--building-color1);
}
.fb3-window {
width: 25%;
height: 80%;
background-color: var(--window-color1);
}
Preview:
Question:
Why the overflow of three black .fb3-window
div inside .fb3a
div do not affect layouts of other three div which have the same level with .fb3a
in html doc?
I originnally consider they will overflow the parent container .fb3
instead due to the overflow inside .fb3a
.
or why three black .fb3-window
div inside .fb3a
overflow like hiding behind the layer where .fb3a
is in?
Pre-thanks for your reply and correcting!!!
Course Link: full-stack-developer workshop-city-skyline step-91