HTMLify

Flower
Views: 26 | Author: djdj
<style>
body {
    margin: 0;
    padding: 30px;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 90vh;
    box-sizing: border-box;
    background-color: black;
}

.section {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 800px; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}
.section .box {
    position: absolute;
    width: 100px; 
    height: 100px;
}

.section div:nth-child(1) {
    background: linear-gradient(to bottom right, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(250deg) skew(20deg, 20deg) translate(50px, 50px);
}

.section div:nth-child(2) {
    background: linear-gradient(to bottom right, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(293.5deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(3) {
    background: linear-gradient(to bottom right, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(340deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(4) {
    background: linear-gradient(to bottom right, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(385deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(5) {
    background: linear-gradient(to bottom right, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(428deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(6) {
    background: linear-gradient(to bottom right, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(473deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(7) {
    background: linear-gradient(to bottom right, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(518deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(8) {
    background: linear-gradient(to bottom right, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(563deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(9) {
    background: linear-gradient(to top left, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(586deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(10) {
    background: linear-gradient(to top left, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(272deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(11) {
    background: linear-gradient(to top left, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(-44deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(12) {
    background: linear-gradient(to top left, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(1deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(13) {
    background: linear-gradient(to top left, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(46deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(14) {
    background: linear-gradient(to top left, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(90deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(15) {
    background: linear-gradient(to top left, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(135deg) skew(20deg, 20deg) translate(50px, 50px);
}
.section div:nth-child(16) {
    background: linear-gradient(to top left, yellow, orange);
    border-radius: 50% 50% 0% 50%;
    transform: rotateZ(180deg) skew(20deg, 20deg) translate(50px, 50px);
}

#button {
    text-align: center;
    height: 3.5rem;
    width: 3.5rem;
    border-radius: 50%;
}

button {
    font-size: 21px;
    color: brown;
    background-color: yellow;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    height: 3.5rem;
    width: 3.5rem;
    border-radius: 50%;
    box-shadow: 4px 4px 8px rgba(101, 52, 5, 0.879),
                -4px -4px 8px rgba(101, 52, 5, 0.879),
                4px -4px 8px rgba(101, 52, 5, 0.879),
                -8px 8px 8px rgba(101, 52, 5, 0.879);
}

.container{
    text-align: center;
    top:50%;
    left:50%;
    transform: translateX(-50%);
    position: absolute;
    font-size:30px;
    background: linear-gradient(to right, 
        rgb(218, 147, 16), white,  green);
    -webkit-background-clip: text;
    color: transparent;
    display: none;
}
</style>
<body class="body">
    <section class="section">
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
        <div class="box" style="border:0px;"></div>
        <div class="box" id="button">
            <button  id="btn">Click</button>
        </div>
    </section>
    <div class="container">
        <h3>Hi, Dj Upraity</h3>
    </div>
</body>
<script>
document.getElementById('btn').addEventListener('click', () => {
    const boxes = document.querySelectorAll('.box'); 
    const container = document.querySelector('.container');
    const section = document.querySelector('.section');
    const body = document.querySelector('.body');
    boxes.forEach((box, index) => {
        setTimeout(() => {
            box.style.transition = 'opacity 0.8s ease-out'; 
            box.style.opacity = '0'; 
            setTimeout(() => {
                  box.style.display = 'none'; 
                  const allBoxesHidden = Array.from(boxes).every(
                    b => b.style.display === 'none');
                  if (allBoxesHidden) {
                      section.style.display = 'none';
                      container.style.display = 'block';
                      body.style.display = 'block';
                      // body.style.padding = '10px';
                  }
            }, 500); 
        }, index * 500); 
    });
  });
  
</script>

Comments

amar 2025-03-01 14:46

Bhayankar.......