DEV Community

Prince
Prince

Posted on

1

Morphism Ring code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Morphing Gradient Ring</title>
    <style>
        body {
            margin: 0;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(120deg, #0d1015, #091529);
            overflow: hidden;
        }

        .ring-container {
            position: relative;
            width: 300px;
            height: 300px;
        }

        .ring {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            background: conic-gradient(
            from 0deg, #ff7eb3, #ff758c,#ff6a56, 
            #f9a826,#f02fc2#9b00ff,#ff7eb3
            );
            transform: translate(-50%, -50%) 
            rotate(0deg);
            animation: rotateRing 5s linear infinite;
        }

        .ring::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 80%;
            height: 80%;
            background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.1));
            border-radius: 50%;
            filter: blur(10px);
            transform: translate(-50%, -50%);
        }

        .ring::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 60%;
            height: 60%;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            transform: translate(-50%, -50%);
        }

        @keyframes rotateRing {
            0% {
                transform: translate(-50%, -50%) 
                rotate(0deg);
            }
            100% {
                transform: translate(-50%, -50%)
                rotate(360deg);
            }
        }
    </style>
</head>
<body>
    <div class="ring-container">
        <div class="ring"></div>
    </div>
</body>
</html>

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

SurveyJS custom survey software

JavaScript UI Library for Surveys and Forms

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

View demo

đź‘‹ Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay