Converting CSS Animations to Transitions

Developer
Size
1,995 Kb
Views
34,408

How do I make an converting css animations to transitions?

Converting a simple CSS3 animation to a transition instead in order to more easily obtain the values of the animation/transition. What is a converting css animations to transitions? How do you make a converting css animations to transitions? This script and codes were developed by Zach Saucier on 20 August 2022, Saturday.

Converting CSS Animations to Transitions Previews

Converting CSS Animations to Transitions - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Converting CSS Animations to Transitions</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h3>But... Which is the animation?</h3>
<div class='rotator animation'></div>
<h3>Is it this one?</h3>
<div class='rotator transition'></div> <script src="js/index.js"></script>
</body>
</html>

Converting CSS Animations to Transitions - Script Codes CSS Codes

.rotator { width: 100px; height: 100px; margin: 20px; background-color:teal;
}
.transition { -webkit-transition: all 1000s linear; -moz-transition: all 1000s linear; -ms-transition: all 1000s linear; -o-transition: all 1000s linear; transition: all 1000s linear;
}
.translateAnimationClass { -webkit-transform: rotateX(43200deg) rotateY(14400deg); -moz-transform: rotateX(43200deg) rotateY(14400deg); -ms-transform: rotateX(43200deg) rotateY(14400deg); -o-transform: rotateX(43200deg) rotateY(14400deg); transform: rotateX(43200deg) rotateY(14400deg);
}
.animation { -webkit-animation: rotator 25s linear infinite; -moz-animation: rotator 25s linear infinite; -ms-animation: rotator 25s linear infinite; -o-animation: rotator 25s linear infinite; animation: rotator 25s linear infinite;
}
@-webkit-keyframes rotator { 0% { -webkit-transform: rotateX(0deg) rotateY(0deg); } 100% { -webkit-transform: rotateX(1080deg) rotateY(360deg); }
}
@-moz-keyframes rotator { 0% { -moz-transform: rotateX(0deg) rotateY(0deg); } 100% { -moz-transform: rotateX(1080deg) rotateY(360deg); }
}
@-ms-keyframes rotator { 0% { -ms-transform: rotateX(0deg) rotateY(0deg); } 100% { -ms-transform: rotateX(1080deg) rotateY(360deg); }
}
@-o-keyframes rotator { 0% { -o-transform: rotateX(0deg) rotateY(0deg); } 100% { -o-transform: rotateX(1080deg) rotateY(360deg); }
}
@keyframes rotator { 0% { transform: rotateX(0deg) rotateY(0deg); } 100% { transform: rotateX(1080deg) rotateY(360deg); }
}

Converting CSS Animations to Transitions - Script Codes JS Codes

window.onload = function() { document.getElementsByClassName('transition')[0].classList.add('translateAnimationClass'); }
Converting CSS Animations to Transitions - Script Codes
Converting CSS Animations to Transitions - Script Codes
Home Page Home
Developer Zach Saucier
Username Zeaklous
Uploaded August 20, 2022
Rating 3
Size 1,995 Kb
Views 34,408
Do you need developer help for Converting CSS Animations to Transitions?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Zach Saucier (Zeaklous) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!