Animated dots with css, making them move forever - css

I can't seem to make this animation move forever without adding more dots in span.
I would like the amount of dots not to be dependent on the "loading-dots" class, as it is adding more dots increases the duration but its a pain. Could it be possible to have a single dot but animate it forever. I like the ability to change the speed and direction.
Here's the CodePen
* {
box-sizing: border-box;
}
body {
padding: 50px;
background: white;
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px 20px 0px 20px;
}
.loading-container {
overflow: hidden;
float: left;
width: 200px;
}
.loading-dots {
display: inline-block;
animation-name: loading-dots;
animation-duration: 5s;
animation-timing-function: linear;
font-size: 50px;
position: relative;
top: -27px;
color: rgba(blue, 1);
font-family: sans-serif;
white-space: no-wrap;
}
.loading-title {
overflow: display;
position: relative;
font-size: 30px;
top: 10px;
margin-right: 10px;
font-family: monospace;
color: rgba(white, 1);
float: left;
}
#keyframes loading-dots {
0% {
transform: translateX(-600px);
}
100% {
transform: translateX(0px);
}
}
<div class="container">
<span class="loading-title"></span>
<div class="loading-container">
<span class="loading-dots">.................
</span>
</div>
</div>

You can do this with a simple background where it will be easy to control the animation and also the dimension of your dots:
.dots {
height:5px; /*to control the overall height*/
width:200px; /*to control the overall width*/
margin:50px;
background-image:
repeating-linear-gradient(to right,
transparent,transparent 5px, /*5px of transparent*/
blue 5px,blue 10px); /*then 5px of blue */
background-size:200% 100%;
animation:change 3s linear infinite;
}
#keyframes change{
to {
background-position:right;
}
}
<div class="dots"></div>
To change the direction you simply change the position:
.dots {
height:5px;
width:200px;
margin:50px;
background-image:
repeating-linear-gradient(to right,
transparent,transparent 5px,
blue 5px,blue 10px);
background-size:200% 100%;
background-position:right;
animation:change 3s linear infinite;
}
#keyframes change{
to {
background-position:left;
}
}
<div class="dots"></div>
You can check this for more details about the different values used: Using percentage values with background-position on a linear gradient
Another idea using animation on transform :
.dots {
height:5px;
width:200px;
margin:50px;
position:relative;
overflow:hidden;
}
.dots::before {
content:"";
position:absolute;
top:0;
left:0;
right:-100%;
bottom:0;
background-image:
repeating-linear-gradient(to right,
transparent,transparent 5px,
blue 5px,blue 10px);
animation:change 3s linear infinite;
}
#keyframes change{
to {
transform:translateX(-50%);
}
}
<div class="dots"></div>
Changing the direction:
.dots {
height:5px;
width:200px;
margin:50px;
position:relative;
overflow:hidden;
}
.dots::before {
content:"";
position:absolute;
top:0;
left:-100%;
right:0;
bottom:0;
background-image:
repeating-linear-gradient(to right,
transparent,transparent 5px,
blue 5px,blue 10px);
animation:change 3s linear infinite;
}
#keyframes change{
to {
transform:translateX(50%);
}
}
<div class="dots"></div>

Reduce the negative pixel margin. -600px is pretty excessive for 16 dots.
#keyframes loading-dots {
0% {
transform: translateX(-50px);
}
100% {
transform: translateX(0px);
}
}

Related

Using keyframes to animate a shape with clip-path and overflow hidden is glitching for me

When the sand timer goes upside down, there's a glitchy green line.
I think it's to do with the house part (bottom half) being made up of two boxes each with a clip-path and overflow hidden, so when the sand travels outside the bounds of the inside box, it's glitching...
See below:
https://codepen.io/LewisChatham/pen/mdWYyKw
$time: 5s;
$color: aquamarine;
* {
box-sizing: border-box;
}
html {
font-size: 100%;
}
.happy-home {
animation:flip $time ease-in-out infinite;
display: flex;
flex-direction: column;
align-items: center;
position: fixed;
top: 25%;
left: 45%;
overflow: hidden;
.top {
height: 10rem;
width: 10rem;
border: 1.6rem solid #000;
transform: rotate(45deg);
margin-bottom: 1.4rem;
border-radius: 50% 50% 0 50%;
overflow: hidden;
&:before {
animation:top $time linear infinite;
background-color: $color;
border-radius:50%;
content:"";
display:block;
height:10rem;
position:absolute;
top: -2rem;
left: -30%;
width: 10rem;
}
&:after {
animation:top-drip $time linear infinite;
background-color:$color;
content:"";
display:block;
height: 200%;
left: 50%;
position:absolute;
top: -45%;
transform: translate(10rem, 10rem) rotate(135deg);
width:10%;
}
}
.bottom-border {
height: 12rem;
width: 10rem;
position: relative;
background: black;
clip-path: polygon(100% 40%, 100% 100%, 0 100%, 0 40%, 50% 0);
border-radius: 10% 10% 10% 10%;
overflow: hidden;
.bottom {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
height: 8.8rem;
background: white;
width: 6.8rem;
clip-path: polygon(100% 45%, 100% 100%, 0 100%, 0 45%, 50% 5%);
overflow: hidden;
&:before {
animation:bottom $time linear infinite;
background-color:$color;
border-radius:50%;
content:"";
display:block;
height: 10rem;
left: -23%;
position:absolute;
top:0;
transform:translateY(100%);
width: 10rem;
}
&:after {
animation:bottom-drip $time linear infinite;
background-color:$color;
content:"";
display:block;
height:100%;
left:45%;
position:absolute;
top:0;
width:10%;
}
}
}
}
#keyframes flip {
0%, 45% {
transform:rotate(0);
}
50%, 95% {
transform:rotate(180deg);
}
100% {
transform:rotate(360deg);
}
}
#keyframes bottom {
0% {
transform:translateY(100%);
}
50% {
transform:translateY(-5%);
}
51% {
transform:translateY(0%);
}
100% {
transform:translateY(-100%);
}
}
#keyframes top {
0% {
transform:translate(0%, 0%);
}
50% {
transform:translate(8rem, 8rem);
}
51% {
transform:translate(-7rem, -7rem);
}
100% {
transform:translate(1rem, 1rem);
}
}
#keyframes bottom-drip {
0% {
left:45%;
transform:translateY(-100%);
width:10%;
}
5% {
transform:translateY(0);
}
45%, 100% {
left:50%;
transform:translateY(0);
width:0;
}
}
#keyframes top-drip {
0%, 50% {
left:45%;
top: -50%;
transform:translate(10rem, 10rem) rotate(135deg);
width:10%;
}
55% {
left:45%;
top: -50%;
transform:translate(0, 0) rotate(135deg);
width:10%;
}
100% {
left:50%;
top: -50%;
transform:translate(0, 0) rotate(135deg);
width:0;
}
}

How to make an animate progress bar with startup animation using css

I am trying to implement an animated progress bar with startup animation.
The problem is that I am using transform: translateX(-100%); that make ugly effect - progress bar is outside progress area.
Core:
#keyframes slideInFromLeft {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(0);
}
}
.progress {
width:200px;
height:50px;
border:1px solid black;
position:relative;
}
.child {
background:black;
width: 50%;
height: 100%;
animation: 1s ease-out 0s 1 slideInFromLeft;
}
<div class="progress">
<div class="child">x</div>
</div>
How can I fix this ugly effect? Or is there any better way?
Have a look at CSS position property, you need position relative and position absolute.
Then the animation-fill-mode
forwards
The target will retain the computed values set by the last keyframe encountered during execution. The last keyframe depends on the value of animation-direction and animation-iteration-count:
#keyframes slideInFromLeft {
to{ width: 50%; }
}
.progress {
width:200px;
height:50px;
border:1px solid black;
position:relative;
}
.child {
position:absolute;
left:0;
top:0;
background:black;
width: 0%;
height: 100%;
overflow:hidden;
animation: slideInFromLeft 1s ease forwards;
}
<div class="progress">
<div class="child">x</div>
</div>
Now if you want to animate it using translate you have to add overflow:hidden to the parent element
#keyframes slideInFromLeft {
from {
transform: translateX(-100%);
}
}
.progress {
width:200px;
height:50px;
border:1px solid black;
position:relative;
overflow:hidden
}
.child {
background:black;
width: 50%;
height: 100%;
transform: translateX(0%);
animation: slideInFromLeft 1s ease;
}
<div class="progress">
<div class="child">x</div>
</div>
Try this!!
#keyframes slideInFromLeft {
0% {
width: 0;
/*transform: translateX(-100%);*/
}
100% {
width: 90%;
/*transform: translateX(0);*/
}
}
.progress {
width:200px;
height:50px;
border:1px solid black;
position:relative;
overflow:hidden;
}
.child {
background:black;
width: 90%;
height: 100%;
animation: 1s ease-out 0s 1 slideInFromLeft;
}
Using CSS transition and Jquery
<div class="progress">
<div class="child">x</div>
</div>
.progress {
width: 200px;
height: 50px;
border: 1px solid black;
position: relative;
overflow: hidden;
}
.child {
background: black;
width: 0;
height: 100%;
transition: width 2s;
}
You can set de progress using this jquery code.
$(".child").css('width','50%');

CSS, switch left/right to transform/translate for better performance

I found this good CSS animation for a progress bar.
But I want to transform: translate instead of left/right.
How can I switch to transform it? I tried but it doesn't work:
https://codepen.io/shalimano/pen/wBmNGJ
body{
background:#ffffff;
margin:50px 300px;
}
.slider{
position:absolute;
width:1000px;
height:5px;
overflow-x: hidden;
}
.line{
position:absolute;
opacity: 0.4;
background:#4a8df8;
width:150%;
height:5px;
}
.subline{
position:absolute;
background:#4a8df8;
height:5px;
}
.inc{
animation: increase 2s infinite;
}
.dec{
animation: decrease 2s 0.5s infinite;
}
#keyframes increase {
from { left: -5%; width: 5%; }
to { left: 130%; width: 100%;}
}
#keyframes decrease {
from { left: -80%; width: 80%; }
to { left: 110%; width: 10%;}
}
<div class="slider">
<div class="line"></div>
<div class="subline inc"></div>
<div class="subline dec"></div>
</div>
First attempt:
#keyframes increase {
from { transform: translateX(-5%); width: 5%; }
to { transform: translateX(130%); width: 100%;}
}
#keyframes decrease {
from { transform: translateX(-100%); width: 80%; }
to { transform: translateX(1100%); width: 10%;}
}
But it's not the same.
You should consider the fact that percentage value with translate are related to the element size and not parent size like top/left and in order to have good performance you need to also replace the width by scale so that you only use transform and you will not trigger layout changes.
Here is an approximation of your code using only transform:
body {
background: #ffffff;
margin: 50px 10px;
position:relative;
}
.slider {
position: absolute;
left:0;
right:0;
height: 5px;
overflow-x: hidden;
background: rgba(74, 141, 248, 0.4);
}
.slider:before,
.slider:after {
content: "";
position: absolute;
background: #4a8df8;
height: 5px;
width:100%;
transform:scaleX(0);
animation: increase 2s infinite linear;
}
.slider:after {
animation-delay:1s;
}
#keyframes increase {
from {
transform:translateX(0%) scaleX(0);
transform-origin:left;
}
50% {
transform-origin:left;
}
60% {
transform:translateX(0%) scaleX(0.5);
transform-origin:right;
}
80% {
transform:translateX(20%) scaleX(0.3);
transform-origin:right;
}
100% {
transform:translateX(0%) scaleX(0);
transform-origin:right;
}
}
<div class="slider">
</div>
One of the main differences between the two methods (transform: translate and left ) of positioning elements is how they react to percentages. You can use px.

Pure css: Colorate divs behind a particular div

Can someone give me an idea how to colorate the circles behind the airplaine??
Please check this jsfiddle link below
Code:
.main {
display: flex;
position:relative;
border: 1px solid green;
margin: 100px;
overflow:hidden;
}
.plane, .item {
width: 50px;
height: 50px;
display:flex;
align-items: center;
justify-content: center;
}
.item {
margin: 0 5px;
}
.plane {
position:absolute;
-webkit-animation: mymove 3s infinite; /* Safari 4.0 - 8.0 */
animation: mymove 3s infinite;
}
.fa-circle {
font-size:10px;
}
.fa-plane {
transform: rotate(45deg);
color:red;
}
#-webkit-keyframes mymove {
from {left: 0px;}
to {left: 420px;}
}
#keyframes mymove {
from {left: 0px;}
to {left: 420px;}
}
#-webkit-keyframes coloration {
from {color: orange;}
to {color: green;}
}
#keyframes coloration {
from {color: orange;}
to {color: green;}
}
Link: https://jsfiddle.net/b3r51n6z/4/
I want to colorate every circle passed by the plane icone to orange
Here is one way, where I made a change to your markup and then used one pseudo element to create the circles and the other to do the coloration.
The circle is created using a border radius and a box shadow to get a transparent circle (cut-out) and then one stretch the orange colored pseudo behind.
.main {
display: flex;
position:relative;
border: 1px solid green;
margin: 100px;
overflow:hidden;
background: black;
}
.main::before{
content:'';
position:absolute;
left: 0;
top: 0;
width: 120%;
height:100%;
background: orange;
transform: scaleX(0);
transform-origin: left center;
animation: coloration 3s infinite;
}
.plane, .item {
position:relative;
width: 50px;
height: 50px;
display:flex;
align-items: center;
justify-content: center;
}
.item {
overflow:hidden;
}
.item::before{
content:'';
position:absolute;
left: 50%;
top:50%;
width:10px;
height:10px;
border-radius:100%;
box-shadow: 0px -100px 0px 200px #FFF;
transform: translate(-50%,-50%);
}
.plane {
position:absolute;
-webkit-animation: mymove 3s infinite; /* Safari 4.0 - 8.0 */
animation: mymove 3s infinite;
z-index: 1;
}
.fa-plane {
transform: rotate(45deg);
color:red;
}
#-webkit-keyframes mymove {
from { transform: translateX(0); }
to { transform: translateX(420px); }
}
#keyframes mymove {
from { transform: translateX(0); }
to { transform: translateX(420px); }
}
#-webkit-keyframes coloration {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
#keyframes coloration {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class='main'>
<div class='plane'>
<i class="fa fa-3x fa-plane" aria-hidden="true"></i>
</div>
<div class='item'>
</div>
<div class='item'>
</div>
<div class='item'>
</div>
<div class='item'>
</div>
<div class='item'>
</div>
<div class='item'>
</div>
<div class='item'>
</div>
<div class='item'>
</div>
<div class='item'>
</div>
</div>
If you are able to use radial gradient, you could do like this
.main {
display: flex;
position:relative;
border: 1px solid green;
margin: 100px;
height: 50px;
overflow:hidden;
}
.main::before{
content:'';
position:absolute;
left: 0;
top: 0;
width: 120%;
height:100%;
background: radial-gradient(black 15%, transparent 16%) left center;
background-size:40px 40px;
}
.main::after{
content:'';
position:absolute;
left: 0;
top: 0;
width: 0;
height:100%;
background: radial-gradient(orange 15%, transparent 16%) left center;
background-size:40px 40px;
animation: coloration 3s infinite;
}
.plane {
width: 50px;
height: 50px;
display:flex;
align-items: center;
justify-content: center;
position:absolute;
-webkit-animation: mymove 3s infinite; /* Safari 4.0 - 8.0 */
animation: mymove 3s infinite;
z-index: 1;
}
.fa-plane {
transform: rotate(45deg);
color:red;
}
#-webkit-keyframes mymove {
from { transform: translateX(0); }
to { transform: translateX(420px); }
}
#keyframes mymove {
from { transform: translateX(0); }
to { transform: translateX(420px); }
}
#-webkit-keyframes coloration {
from { width: 0; }
to { width: 110%; }
}
#keyframes coloration {
from { width: 0; }
to { width: 110%; }
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class='main'>
<div class='plane'>
<i class="fa fa-3x fa-plane" aria-hidden="true"></i>
</div>
</div>

Drawing animated arc with pure CSS

I know it is possible to draw and animate arcs in SVG and canvas. However, is it possible in CSS?
I have created an arc using the following method:
.arc{
width:150px;
height:400px;
border-radius:50%;
border-right:1px solid black;
border-left:1px solid black;
border-top:1px solid black;
border-bottom:1px solid white;
}
But, how can I animate this? The only way I can think of is having a pure white div over it and sliding that div to the right gradually revealing the arc. Is there a better way?
Here is working demo with minimum of hard-coded variables. This works based on animated circle halves:
.circle {
display: inline-flex;
overflow: hidden;
}
.circle__half {
height: 200px;
width: 100px;
position: relative;
overflow: hidden;
}
.circle__half:before {
height: inherit;
width: inherit;
position: absolute;
content: "";
border-radius: 100px 0 0 100px;
background-color: lime;
transform-origin: 100% 50%;
/* hidden by default */
transform: rotate(180deg);
opacity: 0.65;
animation-name: rotate-circle-half;
animation-duration: 4s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.circle__half--right {
transform: scale(-1, -1);
}
.circle .circle__half--right:before {
animation-name: rotate-circle-half--right;
}
/* show half of circle half of the time */
#keyframes rotate-circle-half {
0% {
transform: rotate(180deg);
}
50% {
transform: rotate(0deg);
}
100% {
transform: rotate(0deg);
}
}
#keyframes rotate-circle-half--right {
0% {
transform: rotate(180deg);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(0deg);
}
}
<div class="circle">
<div class="circle__half"></div>
<div class="circle__half circle__half--right"></div>
</div>
Also the same look as iConnor's answer but doesn't have drawback of hardcoded background-color:
*,
*:before,
*:after {
box-sizing: border-box;
}
.circle {
display: inline-flex;
overflow: hidden;
}
.circle__half {
height: 200px;
width: 100px;
position: relative;
overflow: hidden;
}
.circle__half:before {
height: inherit;
width: inherit;
position: absolute;
content: "";
border-radius: 100px 0 0 100px;
border: 10px solid #00507c;
border-right-color: transparent;
background-color: #0087cf;
transform-origin: 100% 50%;
/* hidden by default */
transform: rotate(180deg);
opacity: 0.65;
animation-name: rotate-circle-half;
animation-duration: 4s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.circle__half--right {
transform: scale(-1, -1);
}
.circle .circle__half--right:before {
animation-name: rotate-circle-half--right;
}
/* show half of circle half of the time */
#keyframes rotate-circle-half {
0% {
transform: rotate(180deg);
}
50% {
transform: rotate(0deg);
}
100% {
transform: rotate(0deg);
}
}
#keyframes rotate-circle-half--right {
0% {
transform: rotate(180deg);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(0deg);
}
}
<div class="circle">
<div class="circle__half"></div>
<div class="circle__half circle__half--right"></div>
</div>
If you need sole CSS3, then you can set a width+height, set border-radius to 100%, disable the extra borders (use only 1 or 2) and add some good pixels to it.
Then you can animate using animate: time animation ease timingFunction;
Declare the animation itself using #-prefix-keyframes { . . . } (Eh yea, looks like most browser engines require prefix for this one, chrome does :S)
I think I might have something close to what you mean:
.qLoader2 {
border: 4px solid blue;
width: 10vw;
height: 10vw;
width: 72px;
height: 72px;
position: absolute;
top: 12vh;
right: 45vw;
left: 45vw;
background: white;
opacity: 0.45;
border-right: none;
border-top: none;
border-left: none;
z-index: 2000;
background-color: transparent;
border-radius: 100%;
transform: rotateZ(0);
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
/* #-moz-keyframes spin { . . . } */
/* #-ms-keyframes spin { . . . } */
/* #-o-keyframes spin { . . . } */
#-webkit-keyframes spin {
from {
transform: rotateZ(0deg) scale(1);
}
50% {
transform: rotateZ(540deg) scale(0.9);
border-color: #0099ff;
}
to {
transform: rotateZ(1080deg) scale(1);
}
}
#keyframes spin {
from {
transform: rotateZ(0deg) scale(1);
}
50% {
transform: rotateZ(540deg) scale(0.9);
border-color: #0099ff;
}
to {
transform: rotateZ(1080deg) scale(1);
}
}
<div class="qLoader2"></div>
On JSFiddle
Feel free to use and modify.
Alternatively you could check something with SVG it's fairly decent as well and supported by most nowadays browsers.
EDIT: Using two arcs, you can have the animation draw cleanly from left-to-right AND have the background show through:
http://jsfiddle.net/sPv4A/6/
Vendor prefixes not included for CSS:
.arcContain {
width: 150px;
height: 400px;
position: relative;
margin: 20px;
}
.arc {
width: 150px;
height: 400px;
border-radius: 50%;
border: 2px solid black;
border-bottom: 2px solid transparent;
position: absolute;
top: 0;
right: 0;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.archideLeft .arc {
top: auto;
bottom: 0;
right: auto;
left: 0;
}
.archide {
width: 50%;
height: 0%;
position: absolute;
top: 0;
right: 0;
overflow: hidden;
animation: appear 1.2s ease-in 1.2s forwards;
}
.archideLeft {
top: auto;
bottom: 0;
right: auto;
left: 0;
animation: appear 1.2s ease-out forwards;
}
#keyframes appear {
to {
height: 100%;
}
}
<div class="arcContain">
<div class="archide archideLeft">
<div class="arc"></div>
</div>
<div class="archide">
<div class="arc"></div>
</div>
</div>
OLD ANSWER: Maybe using two child divs to cover it up, and then have them shrink away to reveal it:
.arc {
width: 150px;
height: 400px;
border-radius: 50%;
border-right: 1px solid black;
border-left: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid white;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
.arcInner {
background: white;
height: 402px;
width: 77px;
position: absolute;
}
.arcLeft {
top: -2px;
left: -2px;
-webkit-transition: height 2s linear;
-moz-transition: height 2s linear;
-ms-transition: height 2s linear;
-o-transition: height 2s linear;
transition: height 2s linear;
}
.arcRight {
bottom: 0;
right: -2px;
-webkit-transition: height 2s 2s linear;
-moz-transition: height 2s 2s linear;
-ms-transition: height 2s 2s linear;
-o-transition: height 2s 2s linear;
transition: height 2s 2s linear;
}
.appear .arcInner {
height: 0;
}
<div class="arc">
<div class="arcInner arcLeft"></div>
<div class="arcInner arcRight"></div>
</div>
As Per Chris B's suggestion on the original question, the answer is to contain the arc in another div and then animate the width of the container:
http://jsfiddle.net/AZb3X/
CSS:
body{
background:orange;
}
.arc{
width:150px;
height:400px;
border-radius:50%;
border-right:1px solid black;
border-left:1px solid black;
border-top:1px solid black;
border-bottom:1px solid white;
float:left;
}
.hider{
width:0px;
overflow:hidden;
-webkit-animation:unhide 12s;
}
#-webkit-keyframes unhide{
100%{width:400px}
}
HTML:
<div class='hider'>
<div class="arc"></div>
</div>
I may be a little late, but I think using two "hiders" and translating one up and one down will look a little better.
Working Example
<div class="wrap">
<div class="arc"></div>
</div>
body {
background:orange;
}
.wrap {
position:absolute;
height:400px;
width:170px;
overflow: hidden;
}
.arc {
position:absolute;
width:150px;
height:400px;
margin:10px;
border-radius:50%;
border-right:1px solid black;
border-left:1px solid black;
border-top:1px solid black;
border-bottom:1px solid transparent;
}
.arc:before {
content:"";
position:absolute;
left:-1px;
top:-2px;
background: orange;
width:76px;
height:375px;
animation:unhide1 5s linear both;
}
.arc:after {
content:"";
position:absolute;
left:75px;
top:-2px;
background: orange;
float: right;
width:76px;
height:375px;
animation: unhide2 5s linear 5s both;
}
#keyframes unhide1 {
100% {
transform: translatey(-375px);
}
}
#keyframes unhide2 {
100% {
transform: translatey(375px);
}
}

Resources