<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
div {
width: 100px;
height: 100px;
color: #fff;
text-align: center;
line-height: 100px;
font-size: 2rem;
margin: 20px;
}
div:nth-child(1) {
background-color: royalblue;
}
div:nth-child(2) {
background-color: gold;
}
div:nth-child(3) {
background-color: crimson;
}
div:nth-child(4) {
background-color: forestgreen;
margin-top: 50px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.