the keyframes i created in my scss should be animating my height to make it a 2s animation but it has not done that instead the height is just transforming instantly but the width in the same keyframe is being animated.
#import url("https://fonts.googleapis.com/css2?family=Maven+Pro:wght#500&family=Roboto&display=swap");
* {
font-family: "Maven Pro", sans-serif;
color: white;
animation-delay: 1s;
}
body {
width: 100%;
height: 100vh;
margin: 0%;
background-color: green;
display: flex;
justify-content: center;
align-items: flex-end;
overflow: hidden;
position: absolute;
bottom: 5%;
}
.swipe {
animation-name: swipeWidthHeight, close;
animation-duration: 0.3s 2s;
animation-delay: 1s, 10s;
animation-fill-mode: forwards, forwards;
display: flex;
justify-content: center;
height: 179px;
width: 434px;
background-color: #fff;
}
.swipe .side {
width: 180px;
height: 100%;
background-color: #fff;
display: flex;
justify-content: center;
animation-name: imageSize;
animation-fill-mode: forwards;
animation-duration: 0.3s;
}
.swipe .side img {
width: 80%;
}
.swipe .center {
position: relative;
animation-name: centerExpand;
animation-fill-mode: forwards;
animation-duration: 0.3s;
width: 74px;
height: 100%;
background-color: #38003c;
display: flex;
justify-content: center;
align-items: center;
}
.swipe .center .popup.firstHalf {
opacity: 0;
position: absolute;
transform: translateX(-50%);
left: 50%;
width: 135px;
height: 35px;
background-color: white;
color: #38003c;
text-align: center;
font-family: "roboto";
font-size: 22px;
line-height: 35px;
font-weight: 500;
animation-name: firstHalf;
animation-delay: 2s;
animation-duration: 3s;
animation-fill-mode: forwards;
}
.swipe .center .popup.eaSports {
opacity: 0;
position: absolute;
transform: translateX(-50%);
left: 50%;
width: 110px;
height: 76px;
background-color: #38003c;
color: #38003c;
display: flex;
align-items: center;
justify-content: center;
animation-name: firstHalf;
animation-delay: 4.8s;
animation-duration: 3s;
animation-fill-mode: forwards;
}
.swipe .center .popup.eaSports img {
width: 61px;
}
.swipe .center .textContainer {
font-weight: 400;
opacity: 0;
margin: 0% 2% 0% 2%;
height: 100%;
width: 100%;
}
.swipe .center .textContainer.left {
text-align: right;
animation-delay: 1.15s;
animation-name: leftText;
animation-duration: 0.2s;
animation-fill-mode: forwards;
animation-timing-function: cubic-bezier(0.34, 0.58, 0.37, 1.48);
}
.swipe .center .textContainer.right {
animation-name: rightText;
animation-delay: 1.15s;
animation-duration: 0.2s;
animation-fill-mode: forwards;
animation-timing-function: cubic-bezier(0.34, 0.58, 0.37, 1.48);
}
.swipe .center img {
width: 44px;
}
#keyframes swipeWidthHeight {
0% {
height: 179px;
width: 434px;
}
100% {
height: 77px;
width: 1064px;
}
}
#keyframes centerExpand {
90% {
justify-content: space-between;
}
100% {
width: 1020px;
justify-content: space-between;
}
}
#keyframes rightText {
0% {
opacity: 1;
}
100% {
padding-left: 10%;
opacity: 1;
}
}
#keyframes leftText {
0% {
opacity: 1;
}
100% {
padding-right: 10%;
opacity: 1;
}
}
#keyframes imageSize {
100% {
height: 77px;
width: 77px;
}
}
#keyframes firstHalf {
0% {
opacity: 1;
bottom: 0%;
z-index: -1;
}
10% {
z-index: -1;
opacity: 1;
bottom: 100%;
}
90% {
z-index: -1;
opacity: 1;
bottom: 100%;
}
99% {
z-index: -1;
opacity: 1;
bottom: 0%;
}
100% {
z-index: -1;
opacity: 0;
bottom: 0%;
}
}
#keyframes close {
100% {
width: 1064px;
height: 77px;
bottom: -20%;
}
}
<body>
<div class="swipe">
<div class="left side">
<img src="https://cdn.discordapp.com/attachments/868038988437536768/918357217772732446/crest.svg" alt="">
</div>
<div class="center">
<div class="firstHalf popup">First Half</div>
<div class="eaSports popup">
<img src="https://cdn.discordapp.com/attachments/868038988437536768/918357218003415080/ea-sports-logo.png" alt="">
</div>
<div class="textContainer left">
<h1 class="text ">MANCHESTER CITY</h1>
</div>
<img src="https://cdn.discordapp.com/attachments/868038988437536768/918357218208907274/premier-league-icon.png" alt="">
<div class="textContainer right">
<h1 class="text ">MANCHESTER CITY</h1>
</div>
</div>
<div class="right side">
<img src="https://cdn.discordapp.com/attachments/868038988437536768/918357217772732446/crest.svg" alt="">
</div>
</div>
</body>
In the codepen the class "swipe" and key frame of 'swipeWidthHeight'is the element thats is having issues with the height not animating.
here is a codepen below if the whole project for a better understanding
https://codepen.io/charlieschuyler/pen/zYBZzZv
Comma Missing:
.swipe {
animation-name: swipeWidthHeight, close;
animation-duration: 0.3s, 2s; /* missing comma */
animation-delay: 1s, 10s;
animation-fill-mode: forwards, forwards;
display: flex;
justify-content: center;
height: 179px;
width: 434px;
background-color: #fff;
}
I have my task on three circles ripple effect animation where I am not getting the third circle I have a tried a lot but only two circles are coming is there a possibility of using one more keyframes and getting the third circle can anyone point me in the right direction thanks in advance.
body {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
margin: 0;
}
html {
height: 100%;
}
.ripple {
position: relative;
height: 100px;
width: 100px;
}
.ripple img {
position: relative;
border-radius: 50%;
height: 100%;
width: 100%;
z-index: 2;
}
.ripple::before,
.ripple::after {
animation: pulse 2s linear infinite;
border: #55443D solid 3px;
border-radius: 50%;
box-sizing: border-box;
content: ' ';
height: 140%;
left: -20%;
opacity: .6;
position: absolute;
top: -20%;
transform: scale(0.714);
width: 140%;
z-index: 1;
}
.ripple::after { animation-delay: 1s; }
.ripple:hover::before,
.ripple:hover::after {
animation: pulse 1s linear infinite, cycle-colors 6s linear infinite;
}
.ripple:hover::after { animation-delay: .5s; }
#keyframes cycle-colors {
0% { border-color: #55443D; }
25% { border-color: #55443D; }
50% { border-color: #55443D; }
75% { border-color: #55443D; }
100% { border-color: #55443D; }
}
#keyframes pulse {
to {
opacity: 0;
transform: scale(1);
}
}
<div class="ripple">
<img src="https://image.ibb.co/dBkJkV/person-4.png">
</div>
body {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
margin: 0;
}
html {
height: 100%;
}
.ripple {
position: relative;
height: 100px;
width: 100px;
}
.ripple img {
position: relative;
border-radius: 50%;
height: 100%;
width: 100%;
z-index: 2;
}
.ripple span,
.ripple::before,
.ripple::after {
animation: pulse 2s linear infinite;
border: #55443D solid 3px;
border-radius: 50%;
box-sizing: border-box;
content: ' ';
height: 140%;
left: -20%;
opacity: .6;
position: absolute;
top: -20%;
transform: scale(0.714);
width: 140%;
z-index: 1;
pointer-events:none;
}
.ripple span {
animation-delay: .5s;
}
.ripple::after {
animation-delay: 1s;
}
.ripple:hover span,
.ripple:hover::before,
.ripple:hover::after {
animation: pulse 1s linear infinite, cycle-colors 6s linear infinite;
}
.ripple:hover span {
animation-delay: .25s;
}
.ripple:hover::after {
animation-delay: .5s;
}
#keyframes cycle-colors {
0% {
border-color: #55443D;
}
25% {
border-color: #55443D;
}
50% {
border-color: #55443D;
}
75% {
border-color: #55443D;
}
100% {
border-color: #55443D;
}
}
#keyframes pulse {
to {
opacity: 0;
transform: scale(1);
}
}
<div class="ripple">
<img src="https://image.ibb.co/dBkJkV/person-4.png"><span></span>
</div>
I'm trying to make this image slider go faster. There also seems to be an issue if you click the radio buttons to go the next slide, the autoplay function seems to stop all together.
I can see that there is web kit key frames but I have never used them or even know how to remotely do the math to get it working flawlessly. I grabbed this code from a free source I found. So I'm sure there is some unneeded styles. But any suggestions is GREATLY appericated.
Any ideas?
/* Making Thing Pretty
---------------------------- */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.opencanvascontainer {
margin: 0 auto;
max-width: 1140px;
}
[class*=bit-] {
float: left;/*padding:.3em;*/
}
/* OBSW Grid System
---------------------------- */
.box {
text-align: center;
border: solid 1px black;
color: #000;
font-size: 12px;
font-family: 'proxima_nova_rgregular', sans-serif;
padding: 15px 10px 15px 10px;
}
.bit-1 {
width: 100%;
}
.bit-2 {
width: 50%;
}
.bit-3 {
width: 33.33333%;
padding: 20px;
}
.bit-4 {
width: 25%;
}
.bit-5 {
width: 20%;
}
.bit-6 {
width: 16.66667%;
padding: .3em;
}
.bit-7 {
width: 14.28571%;
}
.bit-8 {
width: 12.5%;
}
.bit-9 {
width: 11.11111%;
}
.bit-10 {
width: 10%;
}
.bit-11 {
width: 9.09091%;
}
.bit-12 {
width: 8.33333%;
}
.bit-25 {
width: 25%;
}
.bit-40 {
width: 40%;
}
.bit-60 {
width: 60%;
}
.bit-75 {
width: 75%;
}
.bit-35 {
width: 35%;
}
.bit-65 {
width: 65%;
}
/* Laptop */
#media (min-width:50em) and (max-width:68.75em) {
.bit-7, .bit-35, .bit-65 {
width: 100%;
}
.bit-10, .bit-12, .bit-4, .bit-8 {
width: 50%;
}
}
/* Tablet */
#media (min-width:30em) and (max-width:50em) {
.bit-10, .bit-12, .bit-4, .bit-6, .bit-8 {
width: 50%;
}
.bit-1, .bit-11, .bit-3, .bit-5, .bit-7, .bit-9 {
width: 100%;
}
}
/* Mobile */
#media (max-width:30em) {
.bit-1, .bit-10, .bit-11, .bit-12, .bit-2, .bit-3, .bit-4, .bit-5, .bit-6, .bit-7, .bit-8, .bit-9 {
width: 100%;
}
}
/* -------------------------
End OBSW Grid System */
/* Full Width Wrapper
---------------------------- */
.fullwidthwrapper {
width: 100%;
padding-top: 150px;
}
#media (max-width:991px) {
.fullwidthwrapper {
padding-top: 5px;
}
}
#media (max-width:907px) {
.fullwidthwrapper {
padding-top: 5px;
line-height: 42px;
}
}
/* -------------------------
End Full Width Wrapper */
/* Header Slider
---------------------------- */
.gallery .control-operator:target ~ .controls .control-button {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
.gallery .control-button:first-of-type, .gallery .control-operator:nth-of-type(1):target ~ .controls .control-button:nth-of-type(1), .gallery .control-operator:nth-of-type(2):target ~ .controls .control-button:nth-of-type(2), .gallery .control-operator:nth-of-type(3):target ~ .controls .control-button:nth-of-type(3), .gallery .control-operator:nth-of-type(4):target ~ .controls .control-button:nth-of-type(4), .gallery .control-operator:nth-of-type(5):target ~ .controls .control-button:nth-of-type(5) {
color: white;
color: rgba(255, 255, 255, 0.8);
}
.gallery .item:first-of-type {
position: static;
pointer-events: auto;
opacity: 1;
}
.gallery .item {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
opacity: 0;
-webkit-transition: opacity .5s;
-o-transition: opacity .5s;
transition: opacity .5s;
}
.gallery .control-operator {
display: none;
}
.gallery .control-operator:target ~ .item {
pointer-events: none;
opacity: 0;
-webkit-animation: none;
-o-animation: none;
animation: none;
}
.gallery .control-operator:target ~ .controls .control-button {
-webkit-animation: none;
-o-animation: none;
animation: none;
}
#-webkit-keyframes controlAnimation-3 {
0% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
9.5%, 33.3% {
color: white;
color: rgba(255, 255, 255, 0.8);
}
42.9%, 100% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
}
#-o-keyframes controlAnimation-3 {
0% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
9.5%, 33.3% {
color: white;
color: rgba(255, 255, 255, 0.8);
}
42.9%, 100% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
}
#keyframes controlAnimation-3 {
0% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
9.5%, 33.3% {
color: white;
color: rgba(255, 255, 255, 0.8);
}
42.9%, 100% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
}
#-webkit-keyframes galleryAnimation-3 {
0% {
opacity: 0;
}
9.5%, 33.3% {
opacity: 1;
}
42.9%, 100% {
opacity: 0;
}
}
#-o-keyframes galleryAnimation-3 {
0% {
opacity: 0;
}
9.5%, 33.3% {
opacity: 1;
}
42.9%, 100% {
opacity: 0;
}
}
#keyframes galleryAnimation-3 {
0% {
opacity: 0;
}
9.5%, 33.3% {
opacity: 1;
}
42.9%, 100% {
opacity: 0;
}
}
.gallery .control-operator:nth-of-type(1):target ~ .item:nth-of-type(1) {
pointer-events: auto;
opacity: 1;
}
.gallery .control-operator:nth-of-type(2):target ~ .item:nth-of-type(2) {
pointer-events: auto;
opacity: 1;
}
.gallery .control-operator:nth-of-type(3):target ~ .item:nth-of-type(3) {
pointer-events: auto;
opacity: 1;
}
.items-3.autoplay .control-button {
-webkit-animation: controlAnimation-3 12s infinite;
-o-animation: controlAnimation-3 12s infinite;
animation: controlAnimation-3 12s infinite;
}
.items-3.autoplay .item {
-webkit-animation: galleryAnimation-3 12s infinite;
-o-animation: galleryAnimation-3 12s infinite;
animation: galleryAnimation-3 12s infinite;
}
.items-3 .control-button:nth-of-type(1), .items-3 .item:nth-of-type(1) {
-webkit-animation-delay: -2s;
-o-animation-delay: -2s;
animation-delay: -2s;
}
.items-3 .control-button:nth-of-type(2), .items-3 .item:nth-of-type(2) {
-webkit-animation-delay: 2s;
-o-animation-delay: 2s;
animation-delay: 2s;
}
.items-3 .control-button:nth-of-type(3), .items-3 .item:nth-of-type(3) {
-webkit-animation-delay: 6s;
-o-animation-delay: 6s;
animation-delay: 6s;
}
.gallery .control-button {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
.gallery .control-button:hover {
color: white;
color: rgba(255, 255, 255, 0.8);
}
/*
Theme controls how everything looks in Gallery CSS.
*/
.gallery {
position: relative;
}
.gallery .item {
height: auto;
overflow: hidden;
text-align: center;
background: #e9e9e8; /* BACKGROUND COLOR HERE */
}
.gallery .controls {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
}
.gallery .control-button {
display: inline-block;
margin: 0 .02em;
font-size: 3em;
text-align: center;
text-decoration: none;
-webkit-transition: color .1s;
-o-transition: color .1s;
transition: color .1s;
}
.hpfullwidth-top {
background-color: #fff;
background-repeat: repeat;
padding-top: 150px;
}
#media (max-width:991px) {
.hpfullwidth-top {
padding-top: 5px;
}
}
.imageholder {
max-width: 1140px;
margin: 0 auto;
}
/* -------------------------
End Header Slider */
/* Image Hover
---------------------------- */
.fade {
opacity: 1;
transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-webkit-transition: opacity .5s ease-in-out;
}
fade:hover {
opacity: 0.5;
}
/* -------------------------
End Image Hover */
<!-- Start Body Content -->
<div class="fullwidthwrapper">
<div class="gallery autoplay items-3">
<div class="control-operator" id="item-1"> </div>
<div class="control-operator" id="item-2"> </div>
<div class="control-operator" id="item-3"> </div>
<figure class="item"><a href="/all/bogofreeboots.cat?source=BOGOFREEMonetateFullWidthViewAll&icid=20161116_holiday">
<picture>
<source media="(min-width: 50em)" srcset="//deichmann.scene7.com/is/image/deichmann/BOGOFREEHOMESLIDER?wid=2000&fmt=gif" width="100%" />
<source media="(min-width: 0em)" srcset="//deichmann.scene7.com/is/image/deichmann/SLIDER1-MOBILE?wid=580&fmt=gif" width="100%" />
<!-- img tag for browsers that do not support picture element --> <img alt="Get More. Save More." src="//deichmann.scene7.com/is/image/deichmann/BOGOFREEHOMESLIDER?wid=2000&fmt=gif" width="100%" /> </picture>
</a></figure>
<figure class="item"><a href="/womens/bogofreeboots.cat?source=BOGOFREEMonetateFullWidthShopWomens&icid=20161116_holiday">
<picture>
<source media="(min-width: 50em)" srcset="//deichmann.scene7.com/is/image/deichmann/SLIDER2?wid=1500&fmt=jpg" width="100%" />
<source media="(min-width: 0em)" srcset="//deichmann.scene7.com/is/image/deichmann/SLIDER2-MOBILE?wid=580&fmt=jpg" width="100%" />
<!-- img tag for browsers that do not support picture element --> <img alt="Get More. Save More." src="//deichmann.scene7.com/is/image/deichmann/SLIDER2?wid=1500&fmt=jpg" width="100%" /> </picture>
</a></figure>
<figure class="item"><a href="/mens/bogofreeboots.cat?source=BOGOFREEMonetateFullWidthShopMens&icid=20161116_holiday">
<picture>
<source media="(min-width: 50em)" srcset="//deichmann.scene7.com/is/image/deichmann/SLIDER3?wid=1500&fmt=jpg" width="100%" />
<source media="(min-width: 0em)" srcset="//deichmann.scene7.com/is/image/deichmann/SLIDER3-MOBILE?wid=580&fmt=jpg" width="100%" />
<!-- img tag for browsers that do not support picture element --> <img alt="Get More. Save More." src="//deichmann.scene7.com/is/image/deichmann/SLIDER3?wid=1500&fmt=jpg" width="100%" /> </picture>
</a></figure>
<div class="controls"><a class="control-button" href="#item-1">•</a> <a class="control-button" href="#item-2">•</a> <a class="control-button" href="#item-3">•</a></div>
</div>
</div>
<!-- End Body Content -->
Thanks!
EDIT:
Here's the example: https://jsfiddle.net/oLajysar/2/
.items-3.autoplay .item {
-webkit-animation: galleryAnimation-3 9s infinite;
-o-animation: galleryAnimation-3 9s infinite;
animation: galleryAnimation-3 9s infinite;
}
This is for the divided slide speed. The three speeds should be equal to this.
.items-3 .control-button:nth-of-type(1), .items-3 .item:nth-of-type(1) {
-webkit-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
}
.items-3 .control-button:nth-of-type(2), .items-3 .item:nth-of-type(2) {
-webkit-animation-delay: 3s;
-o-animation-delay: 3s;
animation-delay: 3s;
}
.items-3 .control-button:nth-of-type(3), .items-3 .item:nth-of-type(3) {
-webkit-animation-delay: 6s;
-o-animation-delay: 6s;
animation-delay: 6s;
}
These are the delays for animation. So within the 9s time frame of our gallery,
we'll be showing each item at the set time we set our delay to.
First item will be shown at the 0 second mark,
Second item will be shown at the 3 second mark, and the
Third item will be shown at the 6 second mark.
We have an extra 3s for our gallery because our last (third) item needs time to be displayed.
.items-3.autoplay .control-button {
-webkit-animation: controlAnimation-3 9s infinite;
-o-animation: controlAnimation-3 9s infinite;
animation: controlAnimation-3 9s infinite;
}
This is the delay of the item selector (the three dots at the bottom).
We want this in sync with our gallery so it'll mark the right item.
I'm animating line with css3 from width:0 to width:100%. At the moment is moving from left to right, but I want to make it to start from right to left. Is this posible at all with keyframes?
here is my code
.content {
width: 400px;
height: 200px;
color: white;
cursor: pointer;
text-transform: uppercase;
padding-bottom: 20px;
position: relative;
background: #333;
}
.content .line {
height: 2px;
background: white;
position: absolute;
top: 10px;
-webkit-animation: dude .75s 1 forwards;
-moz-animation: dude .75s 1 forwards;
-o-animation: dude .75s 1 forwards;
animation: dude .75s 1 forwards;
}
#-webkit-keyframes dude {
0% {
width: 0;
}
100% {
width: 100%;
}
}
#-moz-keyframes dude {
0% {
width: 0;
}
100% {
width: 100%;
}
}
#-o-keyframes dude {
0% {
width: 0;
}
100% {
width: 100%;
}
}
#keyframes dude {
0% {
width: 0;
}
100% {
width: 100%;
}
}
<div class="content">
<div class="line"></div>
</div>
See this FIDDLE
add
.content .line {
right: 0;
}
.content {
width: 400px;
height: 200px;
color: white;
cursor: pointer;
text-transform: uppercase;
padding-bottom: 20px;
position: relative;
background: #333;
}
.content .line {
height: 2px;
background: white;
position: absolute;
top: 10px;
right: 0;
-webkit-animation: dude .75s 1 forwards;
animation: dude .75s 1 forwards;
}
#-webkit-keyframes dude {
0% {
width: 0;
}
100% {
width: 100%;
}
}
#keyframes dude {
0% {
width: 0;
}
100% {
width: 100%;
}
}
<div class="content">
<div class="line"></div>
</div>
Try to animate "left" property instead of width as your element already has position set to absolute.
#keyframes dude {
0% {
left: 100%;
}
100% {
left: 0;
}
}
FIDDLE
change animation-direction to reverse
animation: dude .75s 1 reverse;
The css animation is http://codepen.io/pksunkara/pen/gbejPv. It was inspired by http://codepen.io/fbrz/pen/ljuJn.
EDIT: How do you stop the first frame jump in that codepen?
HTML of my codepen is given below.
<div id="loader">
<div id="loaderout" class="box">
<div id="loaderin" class="box"></div>
<div class="ballbox box">
<div class="first-1 ball"></div>
<div class="second-1 ball"></div>
</div>
</div>
<div class="ballbox box">
<div class="first-2 ball"></div>
<div class="second-2 ball"></div>
</div>
</div>
CSS of my codepen is given below:
body {
background: #e9e9e9;
}
#loader {
position: absolute;
top: calc(50% - 40px);
left: calc(50% - 40px);
}
.box {
width: 80px;
height: 80px;
}
#loaderout + .ballbox {
animation: rotate-1 1.5s linear infinite;
}
#loaderin + .ballbox {
animation: rotate-2 1.5s ease-in-out infinite;
}
#loaderout {
animation: rotate-1 1.5s linear infinite;
clip: rect(0, 80px, 80px, 40px);
position: absolute;
}
#keyframes rotate-1 {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(220deg);
}
}
#keyframes rotate-2 {
0% {
transform: rotate(-140deg);
}
100% {
transform: rotate(140deg);
}
}
#loaderin {
animation: rotate-2 1.5s ease-in-out infinite,
animate 1.5s ease-in-out infinite;
clip: rect(0, 80px, 80px, 40px);
border-radius: 50%;
height: 80px;
width: 80px;
position: absolute;
}
#keyframes animate {
0% {
box-shadow: inset #e04e38 0 0 0 16px;
}
50% {
box-shadow: inset #e04e38 0 0 0 2px;
}
100% {
box-shadow: inset #e04e38 0 0 0 16px;
}
}
.ball {
position: absolute;
background: #e04e38;
border-radius: 50%;
}
.first-1 {
animation: borderball 1.5s ease-in-out infinite;
}
.second-1 {
animation: borderball 1.5s ease-in-out infinite;
bottom: 0;
}
.first-2 {
animation: borderball 1.5s ease-in-out infinite,
firstball 1.5s ease-in-out infinite;
}
.second-2 {
animation: borderball 1.5s ease-in-out infinite,
secondball 1.5s ease-in-out infinite;
bottom: 0;
visibility: hidden;
}
#keyframes firstball {
1%, 49% {
visibility: visible;
}
0%, 50%, 100% {
visibility: hidden;
}
}
#keyframes secondball {
0%, 50%, 100% {
visibility: hidden;
}
51%, 99% {
visibility: visible;
}
}
#keyframes borderball {
0%, 100% {
width: 16px;
height: 16px;
left: 32px;
}
50% {
width: 2px;
height: 2px;
left: 38px;
}
}
I fixed it by changing some specific CSS rules to the following.
.second-2 {
animation: borderball 1.5s ease-in-out infinite,
secondball 1.5s ease-in-out infinite;
bottom: 0;
opacity: 0;
}
#keyframes firstball {
0%, 50% {
opacity: 1;
}
51%, 100% {
opacity: 0;
}
}
#keyframes secondball {
0%, 50% {
opacity: 0;
}
51%, 100% {
opacity: 1;
}
}