? Simple Flower Program
? Simple Flower Program
<!DOCTYPE html>
<html>
<head>
<title>Flower Design</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f8ff;
}
.flower {
position: relative;
width: 100px;
height: 100px;
}
.petal {
width: 50px;
height: 50px;
background-color: pink;
border-radius: 50%;
position: absolute;
}
.center {
width: 40px;
height: 40px;
background-color: yellow;
border-radius: 50%;
position: absolute;
top: 30px;
left: 30px;
}
</style>
</head>
<body>
<div class="flower">
<div class="petal"></div>
<div class="petal"></div>
<div class="petal"></div>
<div class="petal"></div>
<div class="center"></div>
</div>
</body>
</html>
1. Notepad खोलो
2. ऊपर वाला code copy करो
3. file save करो → [Link]
4. Browser में open करो (Chrome, Edge आदि)
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #eef;
}
/* Flower container */
.flower {
position: relative;
width: 150px;
height: 150px;
animation: rotateFlower 5s linear infinite;
}
/* Rotation animation */
@keyframes rotateFlower {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Petals */
.petal {
width: 60px;
height: 60px;
background: pink;
border-radius: 50%;
position: absolute;
}
/* Center */
.center {
width: 50px;
height: 50px;
background: yellow;
border-radius: 50%;
position: absolute;
top: 50px;
left: 50px;
}
</style>
</head>
<body>
<div class="flower">
<div class="petal"></div>
<div class="petal"></div>
<div class="petal"></div>
<div class="petal"></div>
<div class="center"></div>
</div>
</body>
</html>