This time I will show you how to make a counterclockwise rotation countdown in CSS3. What are the precautions for making a counterclockwise rotation countdown in CSS3? The following is a practical case, let’s take a look.
Many answer H5 interfaces have a rotating countdown effect, aanimation that continuously rotates and decreases, similar to the picture below.
I studied it today and it can be obtained through border rotation. Generally we can get a four-segment circle through border. See the Pen circle by stoneniqiu (@stoneniqiu) on CodePen. Next, you can create a countdown effect by rotating: See the Pen circle-rotate by stoneniqiu (@stoneniqiu) on CodePen. The initial rotation is 45 degrees to make the semicircle just stand up. Then rotate one hundred and eighty degrees..rightcircle{ border-top: .4rem solid #8731fd; border-right: .4rem solid #8731fd; right: 0; transform: rotate(45deg) } .right_cartoon { -webkit-animation: circleProgressLoad_right 10s linear infinite forwards; animation: circleProgressLoad_right 10s linear infinite forwards; } @keyframes circleProgressLoad_right { 0% { -webkit-transform: rotate(46deg); transform: rotate(46deg) } 50%,to { -webkit-transform: rotate(-136deg); transform: rotate(-136deg) } }
timer by stoneniqiu (@stoneniqiu) on CodePen.
@keyframes circleProgressLoad_left { 0%,50% { -webkit-transform: rotate(46deg); transform: rotate(46deg) } to { -webkit-transform: rotate(-136deg); transform: rotate(-136deg) } }
Can the DataTable plug-in implement asynchronous loading?
The API that jQuery must master
The above is the detailed content of How to make counterclockwise rotating countdown in css3. For more information, please follow other related articles on the PHP Chinese website!