<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Colored Boxes</title>
<!-- <link rel="stylesheet" href="styles.css"> -->
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
font-family: Arial, sans-serif;
}
.container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
width: 90%;
max-width: 1000px;
}
.box {
position: relative;
padding: 20px;
color: white;
border-radius: 10px;
text-align: center;
overflow: hidden;
}
.box1 {
background-color: #3498db;
}
.box1::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #2980b9;
clip-path: circle(70% at 30% 30%);
}
.box2 {
background-color: #e74c3c;
}
.box2::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #c0392b;
clip-path: polygon(0 0, 100% 0, 100% 50%, 0 100%);
}
.box3 {
background-color: #2ecc71;
}
.box3::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #27ae60;
clip-path: ellipse(70% 40% at 50% 50%);
}
.box4 {
background-color: #f1c40f;
}
.box4::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #f39c12;
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
h2 {
margin-top: 20px;
margin-bottom: 10px;
font-size: 24px;
position: relative;
z-index: 2;
}
p {
margin: 5px 0;
font-size: 16px;
position: relative;
z-index: 1;
}
</style>
</head>
<body>
<div class="container">
<div class="box box1">
<h2>CodeZillaYE</h2>
<p>CodeZillaYE For You</p>
<p>It's help You</p>
<p>And saved Your Time</p>
</div>
<div class="box box2">
<h2>CodeZillaYE</h2>
<p>CodeZillaYE For You</p>
<p>It's help You</p>
<p>And saved Your Time</p>
</div>
<div class="box box3">
<h2>CodeZillaYE</h2>
<p>CodeZillaYE For You</p>
<p>It's help You</p>
<p>And saved Your Time</p>
</div>
<div class="box box4">
<h2>CodeZillaYE</h2>
<p>CodeZillaYE For You</p>
<p>It's help You</p>
<p>And saved Your Time</p>
</div>
</div>
</body>
</html>