<div class="box1">1</div>
<div class="box2">2</div>
<div class="box3">3</div>
<div class="box4">4</div>
<div class="box5">5</div>
body {
height: 1000px;
}
div {
font-size: 50px;
}
.box1 {
width: 100px;
height: 100px;
background-color: skyblue;
}
.box2 {
width: 400px;
height: 400px;
background-color: pink;
position: relative;
}
.box3 {
width: 100px;
height: 100px;
background-color: wheat;
position: relative;
}
.box4 {
width: 100px;
height: 100px;
background-color: hotpink;
position: fixed;
/* position: absolute; */
top: 0;
left: 0;
}
.box5 {
width: 100px;
height: 100px;
background-color: violet;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.