How to Create Animated Rotating Airplanes with Unique Color Effects in HTML & CSS (Video + Code)

Creating captivating web animations can significantly enhance user experience and engagement on your website. One such fascinating effect is animating rotating airplanes with unique colors and shadows using HTML and CSS. This tutorial will guide you through the steps to achieve this mesmerizing effect, perfect for adding a dynamic and modern touch to your web projects.

YouTube video

Why Use Animated Effects in Web Design?

Animated effects can breathe life into your web design, making it more interactive and appealing. They draw attention, convey information efficiently, and can even guide users through your content. The rotating airplane animation we’re focusing on today is not just visually striking but also relatively easy to implement with basic HTML and CSS knowledge.

Key Features of the Animated Rotating Airplanes

Unique Colors and Shadow Effects

Each airplane in the animation has a distinct color and shadow effect, creating a vibrant and dynamic visual display. This variety in colors makes the animation more engaging and helps in emphasizing different elements if used in a more complex design.

Smooth Rotating Animation

The airplanes rotate smoothly, providing a visually pleasing experience. This smooth animation can make your website feel more polished and professional, contributing to a better overall user experience.

Simple Implementation

Despite the impressive outcome, the code behind this animation is straightforward and easy to implement. With just a few lines of HTML and CSS, you can achieve a professional-looking animation that enhances your web design.

How to Implement the Animated Rotating Airplanes

Step-by-Step Guide

  1. Prepare Your HTML Structure: Start by setting up a basic HTML structure. This includes a container for the airplanes and necessary meta tags for responsiveness.
  2. Add the Airplane Elements: Within your container, add the elements that will represent the airplanes. These elements will be styled and animated using CSS.
  3. Apply CSS Styles: Use CSS to define the appearance and animation of the airplanes. This includes setting the size, colors, shadows, and animation keyframes for the rotating effect.
  4. Test and Adjust: Once your HTML and CSS are in place, test the animation in different browsers and devices to ensure it looks and performs as expected. Make adjustments as needed to achieve the best result.

Copy the Code Below

You can copy the complete HTML and CSS code for the animated rotating airplanes below. Simply paste it into your project to see the effect in action.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
        integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
    <title>Animation Effects</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: #111;
        }

        .container {
            position: relative;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .ring {
            position: relative;
            width: 150px;
            height: 150px;
            border: 4px solid transparent;
            border-top: 4px solid #24ecff55;
            border-radius: 50%;
            margin: -30px;
            filter: drop-shadow(0 0 10px #24ecff) drop-shadow(0 0 30px #24ecff)
                drop-shadow(0 0 50px #24ecff);
            animation: animate 4s linear infinite;
        }

        @keyframes animate {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .ring::before {
            content: "\f135";
            position: absolute;
            top: 10px;
            right: -4px;
            rotate: 90deg;
            font-family: fontAwesome;
            color: #24ecff;
            font-size: 2em;
        }

        .ring:nth-child(2) {
            border: 4px solid transparent;
            border-left: 4px solid #93ff2d;
            filter: drop-shadow(0 0 10px #93ff2d) drop-shadow(0 0 30px #93ff2d)
                drop-shadow(0 0 50px #93ff2d);
            animation: animate2 4s linear infinite;
            animation-delay: -1s;
        }

        .ring:nth-child(2)::before {
            content: "\f072";
            top: initial;
            bottom: -6px;
            left: 12px;
            right: initial;
            rotate: 45deg;
            color: #93ff2d;
        }

        @keyframes animate2 {
            0% {
                transform: rotate(360deg);
            }

            100% {
                transform: rotate(0deg);
            }
        }

        .ring:nth-child(3) {
            position: absolute;
            top: -66.66px;
            border: 4px solid transparent;
            border-left: 4px solid #ff1d6c55;
            filter: drop-shadow(0 0 10px #ff1d6c) drop-shadow(0 0 30px #ff1d6c)
                drop-shadow(0 0 50px #ff1d6c);
            animation: animate2 4s linear infinite;
            animation-delay: -3s;
        }

        .ring:nth-child(3)::before {
            content: "\e518";
            rotate: 135deg;
            top: initial;
            right: initial;
            bottom: -6px;
            left: 12px;
            color: #ff1d6c;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="ring"></div>
        <div class="ring"></div>
        <div class="ring"></div>
    </div>
</body>
</html>

Conclusion

Adding animated effects to your website doesn’t have to be complicated. With the right approach and a bit of creativity, you can create stunning animations that enhance the visual appeal and functionality of your site. The rotating airplane animation is a perfect example of how simple HTML and CSS can be used to create professional and engaging web effects.

Feel free to copy the code provided below and experiment with different styles and animations to suit your specific needs. Happy coding!

Leave a Comment

Item added to cart.
0 items - $0.00