What are the steps to creating a rolling item animation?

body {
            margin: 0px;
        }
        .items_container {
            display: flex;
            align-items: center;
            width: 100%;
            height: 50px;
            background-color: rgb(200,200,200);
        }

        .circle_container {
            display: flex;
            align-items: center;
            position: relative;
            z-index: 100;
        }
        .circle {
            position: absolute;
            margin: 0px 10px;
            border: 0.5px solid black;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: black;
        }
        .btext {
            padding: 0px;
            margin: 0px;
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%; 
            height: 100%;
        }

        hr {
            position: absolute;
            width: 100%;
            z-index: 90;
        }

        .finish_container {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            position: relative;
            width: 100%;
            z-index: 95;
        }
        .finish {
            position: absolute;
            margin: 0px 10px;
            border: 0.5px solid black;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: white;
        }
        .wtext {
            padding: 0px;
            margin: 0px;
            color: black;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%; 
            height: 100%;
        }
<div class="items_container">
        <div class="circle_container">
            <div class="circle">
                <p class="btext">
                    Start
                </p>
            </div>
        </div>
        <hr>
        <div class="finish_container">
            <div class="finish">
                <p class="wtext">
                    Finish
                </p>
            </div>
        </div>
    </div>

I am curious if it's possible to animate the movement of the black (start) circle to the white (finish) circle smoothly. If so, how can I achieve this effect?

![Ignore this sentence. System error message states 'It looks like your post is mostly code; please add some more details.' Apologies for adding this extra text to my question for posting purposes.]!

Answer №1

<div class="spin"></div>
 @keyframes spinAnimation {
 0% {
     transform: translateY(0) rotate(0);
    }
 100%{
     transform: translateY(100px) rotate(360deg);
    }
}
.spin::after{
 content: 'Go'
}
.spin{
 width : 150px;
 height: 150px;
 border-radius: 50%;
 background-color: lightcoral;
 animation :  spinAnimation 1.5s 0s infinite linear;
}

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

Ensure that scripts with the type of "module" are completed before proceeding to execute the following script

In my HTML document, I have two script tags with type="module" at the bottom of the body tag. Following those, there is another script tag with embedded code that relies on the results of the first two scripts. Is there a method to ensure that this code ...

Having trouble getting CSS absolute and relative positioning to work with my div slider carousel

I'm currently working on creating a slider carousel using VUE, where the CSS classes (3 divs) are looped through. However, I am facing an issue where every time a div fades out, the next slider creates a duplicate slider at the bottom, resulting in tw ...

Styled Components do not have the ability to define :hover states

export const WatchVideoButtonWrapper = styled.div` position: absolute; bottom: 80px; right: 33px; background-color: ${(props) => props.bgColor}; color: ${(props) => props.color}; border-radius: 100px; transition: all 0.1s; ...

Preventing Scrollable Div Content from Displaying Behind a Fixed Div using CSS

Seeking help with a message_container division that contains a fixed scrollable message_header division and a scrollable message_body division. The issue I am facing is that the content of the message_body division is appearing behind the fixed div. How ca ...

An error that cannot be recovered from occurred: Trying to access a method called viewConfessionLikes() that is

Greetings! I am currently facing an issue on my website where the page displaying the most liked post is showing an error message: Fatal error: Call to undefined method Confession::viewConfessionLikes() on line 55 Unfortunately, this page is not showing a ...

css position:absolute stacked

Looking for a solution, I'm trying to include a side menu (navbar) on my page by using position: fixed. However, I am facing an issue where all the HTML elements I attempt to add are ignoring it. Check out the positioning problem here. ...

Leveraging the XMLHTTP object to extract data from websites with VBA

I am currently working on extracting the "key people" information from a Wikipedia page: https://en.wikipedia.org/wiki/Abbott_Laboratories and inserting that data into my Excel spreadsheet. I have successfully achieved this using xml http, which I find ef ...

What steps do I need to take to link my form with Ajax and successfully submit it?

Here is my HTML code: {% extends 'base.html' %} {% block content %} <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Create a Recipe ...

tips for obtaining necessary input fields

What is the best way to include mandatory input fields? appreciate it <input type="text" name="name"> ...

How to line up two blocks side by side in a single block with Bootstrap without the use of CSS

The bootstrap margin is causing issues with this code <div class="row"> <div class="row1 col-lg-3"> <div class="row2 col-lg-1"></div> <div class="row2 col-lg-1"></di ...

Struggling to design a form to incorporate changing weekly elements into a homepage

Hey, I'm looking to simplify my life by creating a form that allows me, as the administrator/creator, to easily update a group of weekly variables from datalists without needing to manually change the code every time. <form method="post" action= ...

The options that are not selected in a dropdown menu will not be added to a different dropdown menu

In my application, I have 2 select boxes. When the user submits the page, only the selected students in the first select box #studentadd are appended to the second select box #studentselect. However, the unselected options from #studentadd do not get appen ...

Having issues with ng-view in AngularJs - it's not functioning properly

I am having trouble with the ng-view directive not working. When I implement it, all I see is the "Page" title. Can someone help me diagnose the issue? https://jsfiddle.net/dsgfdyp1/3/ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/b ...

Achieving vertical center alignment for the label and btn-group in Bootstrap

Is it possible to align other elements with the Bootstrap btn-group? <div class="btn-toolbar text-center"> <div class="pull-left"> <span class="glyphicon glyphicon-envelope " style="font-size:1.5em;"></span> < ...

Tips for creating a function that utilizes a select option value

I'm struggling with a form that includes two select inputs. I want the second input to only be enabled if the first one has been selected. I attempted using an onclick event, but it didn't work out as expected. Can anyone provide assistance? (apo ...

Ensuring WCAG Accessibility Compliance - mandate the inclusion of at least one input in a fieldset

I'm working on a form where users need to provide at least one contact method from a group of fields, such as home, work, or mobile phone number. How can I ensure this meets the latest WCAG 2.2 standards? <!-- Other fields above and below --> ...

Help! My express.js query is not functioning properly

I am facing an issue with a query in express.js. Citta_p and Citta_a are two arrays, and I need my query to return all the IDs for cities. However, it seems that only the last value is being returned, as if my cycle starts from var i = 1 and skips the valu ...

Color remains unchanged for selected value in dropdown menu

I'm facing a challenge in changing the color of the selected value in the dropdown menu. Each value has a different color, but when I select one, it reverts back to black. .appt-status select option[value="0"] { color: #3EA47B; } .appt-status o ...

Animate an image element to smoothly slide in from the left while simultaneously fading into view using Javascript

I'm looking to achieve a specific effect using pure JavaScript, HTML, and CSS without the need for jQuery or other libraries. I want an element to fade in and smoothly move to the center of the page from the left after a button click event. My attemp ...

Ways to modify the color of text when it exceeds an element's boundaries

I'm trying to figure out how to change the text color when it hovers over a black circle HTML element that is fixed to the window. I've attempted using mix-blend-mode: difference;, but I can't seem to get it to work. Ideally, I want the text ...