SQUARE CSS code example
Example 1: how to make a responsive box in css
.square {
width: 50%;
}
.square:after {
content: "";
display: block;
padding-bottom: 100%;
}
Example 2: how to create a shape in css
div {
clip-path: polygon(100% 100%, 100% 100%, 100% 100%)
}
Example 3: how to make a square div in css
.square {
background-color: #000;
width: 50vw;
height: 50vw;
}
.square h1 {
color: #fff;
}
/* It works */