Tue Aug 15 2023

Tri-Color Flower

CSS77 views
Tri-Color Flower

File Name: tri-color-flower.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Happy Independence Day</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Marck+Script&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            font-family: 'Marck Script', cursive;
        }

        body {
            background-color: #292929;
        }

        section {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100vh;
        }

        h1 {
            font-size: 40px;
            color: #fff;
            font-weight: normal;
            margin-bottom: 50px;
        }

        .triColor {
            list-style: none;
            display: flex;
            justify-content: center;
        }

        .triColor li {
            width: 50px;
            height: 80px;
            transition: 0.5s all ease-out;
        }

        .triColor li.saffron {
            background-color: #ff9a30;
            border-radius: 0 40px;
            transform-origin: bottom;
            transform: translateX(30px) rotate(5deg);
        }

        .triColor li.white {
            background-color: #fff;
            border-radius: 0 40px;
            transform: rotate(30deg) translateY(-9px);
        }

        .triColor li.green {
            background-color: #098901;
            border-radius: 40px 0;
            transform-origin: bottom;
            transform: translateX(-20px) translateY(0.2px) rotate(-5deg);
        }

        .triColor:hover li.saffron {
            transform: translateX(30px) rotate(-5deg);
        }

        .triColor:hover li.green {
            transform: translateX(-20px) translateY(0.2px) rotate(5deg);
        }
    </style>
</head>
<body>
    <section>
        <div>
            <h1>Happy Independence Day</h1>
            <ul class="triColor">
                <li class="saffron"></li>
                <li class="white"></li>
                <li class="green"></li>
            </ul>
        </div>
    </section>
</body>
</html>

Result Screenshot(s)

Tri-Color FlowerWorking Sample0

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.