`CSS3 animations utilizing keyframes and transformation`

Looking to replicate a similar effect using CSS animations:

I've created a file working with keyframes for the animation, but it's not functioning as desired.

My goal is to have the circles complete a full rotation on their axis, starting from a fixed point at the center.

Thank you.

HTML FILE:

    <ul>
        <li style="animation: move1 2s infinite;"></li>
        <li style="animation: move2 2s infinite;"></li>
        <li style="animation: move3 2s infinite;"></li>
        <li style="animation: move4 2s infinite;"></li>
        <li style="animation: move5 2s infinite;"></li>
        <li style="animation: move6 2s infinite;"></li>
        <li style="animation: move7 2s infinite;"></li>
        <li style="animation: move8 2s infinite;"></li>
        <li style="animation: move9 2s infinite;"></li>
        <li style="animation: move10 2s infinite;"></li>
    </ul>

</body>

CSS FILE:

        body, html {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    ul{
        display: block;
        width: 1920px;
        height: 1080px;
        margin: 0;
        padding: 0;
    }

    li {
        position: absolute;
        display: block;
        top: 50%;
        left: 50%;
        /*transform: translate(-50%, -50%);*/
        border: 1px solid #000;
        border-radius: 100%;
        list-style: none;
    }

    @keyframes move1 {
      0% {
        transform: translate(-46%, -50%);
        width:400px; height:400px; 
      }
      50% {
        transform: translate(-54%, -50%);
        width:400px; height:400px; 
      }
      100% {
        transform: translate(-46%, -50%);
        width:400px; height:400px; 
      }
    }

    @keyframes move2 {
      0% {
        transform: translate(-50%, -46%);
        width:405px; height:405px; 
      }
      50% {
        transform: translate(-50%, -54%);
        width:405px; height:405px; 
      }
      100% {
        transform: translate(-50%, -46%);
        width:405px; height:405px; 
      }
    }

    @keyframes move3 {
      0% {
        transform: translate(-47%, -50%);
        width:410px; height:410px; 
      }
      50% {
        transform: translate(-55%, -50%);
        width:410px; height:410px; 
      }
      100% {
        transform: translate(-47%, -50%);
        width:410px; height:410px; 
      }
    }

    @keyframes move4 {
      0% {
        transform: translate(-50%, -48%);
        width:415px; height:415px; 
      }
      50% {
        transform: translate(-50%, -56%);
        width:415px; height:415px; 
      }
      100% {
        transform: translate(-50%, -48%);
        width:415px; height:415px; 
      }
    }

    @keyframes move5 {
      0% {
        transform: translate(-49%, -50%);
        width:420px; height:420px; 
      }
      50% {
        transform: translate(-57%, -50%);
        width:420px; height:420px; 
      }
      100% {
        transform: translate(-49%, -50%);
        width:420px; height:420px; 
      }
    }

    @keyframes move6 {
      0% {
        transform: translate(-50%, -50%);
        width:425px; height:425px; 
      }
      50% {
        transform: translate(-50%, -58%);
        width:425px; height:425px; 
      }
      100% {
        transform: translate(-50%, -50%);
        width:425px; height:425px; 
      }
    }

    @keyframes move7 {
      0% {
        transform: translate(-51%, -50%);
        width:430px; height:430px; 
      }
      50% {
        transform: translate(-59%, -50%);
        width:430px; height:430px; 
      }
      100% {
        transform: translate(-51%, -50%);
        width:430px; height:430px; 
      }
    }

    @keyframes move8 {
      0% {
        transform: translate(-50%, -52%);
        width:435px; height:435px; 
      }
      50% {
        transform: translate(-50%, -60%);
        width:435px; height:435px; 
      }
      100% {
        transform: translate(-50%, -52%);
        width:435px; height:435px; 
      }
    }

    @keyframes move9 {
      0% {
        transform: translate(-53%, -50%);
        width:440px; height:440px; 
      }
      50% {
        transform: translate(-61%, -50%);
        width:440px; height:440px; 
      }
      100% {
        transform: translate(-53%, -50%);
        width:440px; height:440px; 
      }
    }

    @keyframes move10 {
      0% {
        transform: translate(-50%, -54%);
        width:445px; height:445px; 
      }
      50% {
        transform: translate(-50%, -62%);
        width:445px; height:445px; 
      }
      100% {
        transform: translate(-50%, -54%);
        width:445px; height:445px; 
      }
    }

DEMO: http://plnkr.co/edit/Ntqtszay7BOg4pz8zCv4?p=preview

Answer №1

Do you think this is the desired outcome? https://jsfiddle.net/CREATIVE_SMITH/kn7qjg6c/5/

 @keyframes move1 {
      0% {
        transform: translate(-46%, -50%);
        width:400px; height:400px; 
      }
      50% {
        transform: translate(-54%, -50%);
        width:400px; height:400px; 
      }
      100% {
        transform: translate(-46%, -50%);
        width:400px; height:400px; 
      }
    }

    @keyframes move2 {
      0% {
        transform: translate(-50%, -46%);
        width:1000px; height:1000px; 
      }
      50% {
        transform: translate(-50%, -54%);
        width:405px; height:405px; 
      }
      100% {
        transform: translate(-50%, -46%);
        width:405px; height:405px; 
      }
    }

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Aligning a picture with a heading

I'm currently working on a website header design where I am struggling to align the logo and site title horizontally. As someone who is new to CSS, any guidance or tips would be greatly appreciated! The logo image has the following styling: .logo { ...

Finding and Selecting Dynamic CSS Elements with CSS Selector Techniques

Utilizing a tool called Stonly for adding tooltips, the CSS Selector is used to locate the HTML element for identifying the tooltip. Depending on the user input, a dynamic task list is generated. The challenge arises when trying to pinpoint a specific task ...

Looking for a plugin that can color the text "Google" in the exact shade as the Google logo? Check out this jQuery

Is there a jQuery plugin or similar tool available that can change the color of each letter in the word "Google" to match the colors of the Google logo? For instance, if I have the following HTML markup: <span>Google AdWords</span> I would l ...

Utilizing CSS for Page Orientation

For my current project, I was tasked with designing a print view using HTML & CSS. This view is then converted into a PDF on the server and sent to an A5 printer for physical output. One of the specific requirements of this assignment is that the first pa ...

Arrange the footers in the bootstrap card deck to be perfectly aligned at the top

Using bootstrap 4 to showcase cards has been successful, but there is an issue with footers that have varying content lengths. Instead of the footer adjusting its position based on the content, is there a way to keep the tops aligned while pushing the cont ...

Automatically adjusting the image to fit the screen size

The image on the screen is not resizing properly. Please refer to the image with the alternate text google-play-badge. Even though the width and height of the image are set to auto, it is still not adjusting automatically. https://i.sstatic.net/Tu97S.jpg ...

Tips for aligning a row with both text and input fields in the center

I'm working on a design that includes text and input fields in rows, and I want everything to be centered. Should I wrap all the content in a div and center it as a whole, or should I center each row individually? Any suggestions? Here is the code sn ...

increasing the size of a particular text box above the rest

Just starting out with bootstrap and trying to figure out how to make one text box larger than the others. See my code below: <div class="row"> <div class="col-md-2"> <mat-form-field > <input matInput pla ...

"Struggling to horizontally center a div with a fixed width in CSS - what am I

Whenever I try to use it on my browser, the content shifts to the left and I can't seem to center it using text-align or flexbox. The issue gets resolved when I remove the width property, but I really need it to have that paragraph-style look I'm ...

Arranging Form Elements with Bootstrap styling

Check out the Bootply I created to demonstrate an issue I'm facing: http://www.bootply.com/8fPmr31Wd7 When scrolling down, you'll notice that "People" and "Places" are indented on the sides. It's possible that I'm not using the correc ...

Guide to utilizing the bootstrap grid system to stack below a width of 480px

I have been grappling with this issue, but unfortunately, there seems to be a lack of information on how to resolve it. I have gone through numerous old posts where individuals are "modding" the files and creating their own col-ms (medium-small) that stack ...

Sometimes the Navbar options fail to show up consistently on the Navbar bar

I recently launched my website at campusconnect.cc Unfortunately, I've noticed that when resizing the window, the navbar options are shifting up and down. Can anyone help me identify the issue and provide guidance on how to resolve it? ...

Positioning absolute elements negatively in Firefox may cause unexpected behavior

I attempted to position an absolute element with a negative value, and it works perfectly in every browser except for Firefox. In Chrome, IE, or Safari, the blue handler box is correctly positioned in the middle of the top border. Is there a workaround to ...

When running the `npm run dev` command, Tailwind does not seem to function

I have been given a task to create forms using tailwindcss, but when I try to run `npm run build`, it doesn't work. Can anyone assist me with this? npm ERR! code ELIFECYCLE npm ERR! errno 9 npm ERR! <a href="/cdn-cgi/l/email-protection" class="__cf ...

How can I replicate the Firefox style in IE8 using Bootstrap and CSS?

My webpage is styled with Bootstrap v2 and looks great in Firefox. However, I'm struggling to apply the same CSS color style in IE8: .navbar-inverse .navbar-inner { background-color: #1b1b1b; background-image: -moz-linear-gradient(top, #fab ...

The CSS styles are not being applied correctly in the HTML document

I have this snippet in my .css file: .attachment-label { font-size: 10px; font-style: italic; color: rgba(0,0,0,.5); } When I try to use it in my HTML like this: <div class="card-body"> <span class=" ...

css - the art of centering span text within a rounded button

CodeSandbox: https://codesandbox.io/s/eloquent-haibt-1bnib?file=/src/main.js https://i.sstatic.net/HDtft.png I'm trying to center the dash text within a button, but I'm struggling to find a solution. html <button class="round-butto ...

What is the correct way to effectively target nested elements using CSS?

For a while now, I've been creating websites using HTML and CSS, carefully matching specific tags to my classes or IDs. However, I recently noticed a trend where people use selectors like #test > #blah to indicate that #blah is nested inside of #te ...

Identifying the pressing of the enter key in an input field

Currently, I am developing an innovative IFrame browser that features an omnibox (identified as "address") and a "GO" button (identified as "submit"). One of the key challenges I'm facing is detecting when the user inputs information and hits the Ente ...

Issue with deploying responsive background image on Github platform

My responsive background image isn't displaying properly on mobile devices after I deployed my project to Github. Although it appears correctly under the Google Chrome inspect mobile tool, when accessed live on a mobile device, the image covers the ba ...