Subtle Animation Example

Developer
Size
2,101 Kb
Views
10,120

How do I make an subtle animation example?

What is a subtle animation example? How do you make a subtle animation example? This script and codes were developed by Nick Colley on 12 November 2022, Saturday.

Subtle Animation Example Previews

Subtle Animation Example - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Subtle Animation Example</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="scene"> <div class="poof-left"></div> <div class="rocket"></div> <div class="poof-right"></div> <div class="sun"></div> <div class="clouds"></div>
</div>
<!-- Demo from drpgroup's boom promotion --> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Subtle Animation Example - Script Codes CSS Codes

html,body {	height: 100%;	width: 100%;
}
.scene {	position: relative;	height: 768px;	width: 979px;	background: url('https://i.imgur.com/naThO7D.png') no-repeat;	-webkit-backface-visibility: none;
}
.poof-left {	top: 220px;	left: 250px;	position: absolute;	width: 225px;	height: 206px;	background: url('https://i.imgur.com/2MJE4VT.png') no-repeat 0 0;	-webkit-transform-origin: 100px 5px;	-moz-transform-origin: 100px 5px;	-o-transform-origin: 100px 5px;	-ms-transform-origin: 100px 5px;	transform-origin: 100px 5px;
}
.rocket {	top: 100px;	right: 240px;	position: absolute;	width: 137px;	height: 259px;	background: url('https://i.imgur.com/2MJE4VT.png') no-repeat -228px 0;	-webkit-transform-origin: 75px 80px;	-moz-transform-origin: 75px 80px;	-o-transform-origin: 75px 80px;	-ms-transform-origin: 75px 80px;	transform-origin: 75px 80px;
}
.sun {	top: 95px;	right: 130px;	position: absolute;	width: 78px;	height: 96px;	background: url('https://i.imgur.com/2MJE4VT.png') no-repeat -235px -263px;	-webkit-transform-origin: 35px 10px;	-moz-transform-origin: 35px 10px;	-o-transform-origin: 35px 10px;	-ms-transform-origin: 35px 10px;	transform-origin: 35px 10px;
}
.poof-right {	top: 260px;	right: 140px;	position: absolute;	width: 120px;	height: 129px;	background: url('https://i.imgur.com/2MJE4VT.png') no-repeat -1px -258px;	-webkit-transform-origin: 50% 0;	-moz-transform-origin: 50% 0;	-o-transform-origin: 50% 0;	-ms-transform-origin: 50% 0;	transform-origin: 50% 0;
}
.clouds {	top: 160px;	right: 30px;	position: absolute;	width: 103px;	height: 141px;	background: url('https://i.imgur.com/2MJE4VT.png') no-repeat -126px -266px;	-webkit-transform-origin: 50% 0;	-moz-transform-origin: 50% 0;	-o-transform-origin: 50% 0;	-ms-transform-origin: 50% 0;	transform-origin: 50% 0;
}
.scene div {	-webkit-animation: bob 1s ease-in-out infinite alternate;	-moz-animation: bob 1s ease-in-out infinite alternate;	-ms-animation: bob 1s ease-in-out infinite alternate;	-o-animation: bob 1s ease-in-out infinite alternate;	animation: bob 1s ease-in-out infinite alternate;
}
.scene div:nth-child(even) {	-webkit-animation: bob 1s 1s ease-in-out infinite alternate;	-moz-animation: bob 1s 1s ease-in-out infinite alternate;	-ms-animation: bob 1s 1s ease-in-out infinite alternate;	-o-animation: bob 1s 1s ease-in-out infinite alternate;	animation: bob 1s 1s ease-in-out infinite alternate;
}
@keyframes "bob" { to { -webkit-transform: translateY(2px) rotate(1deg);	-moz-transform: translateY(2px) rotate(1deg);	-o-transform: translateY(2px) rotate(1deg);	-ms-transform: translateY(2px) rotate(1deg);	transform: translateY(2px) rotate(1deg); }
}
@-moz-keyframes bob { to { -moz-transform: translateY(2px) rotate(1deg); transform: translateY(2px) rotate(1deg); }
}
@-webkit-keyframes "bob" { to { -webkit-transform: translateY(2px) rotate(1deg); transform: translateY(2px) rotate(1deg); }
}
@-ms-keyframes "bob" { to { -ms-transform: translateY(2px) rotate(1deg); transform: translateY(2px) rotate(1deg); }
}
@-o-keyframes "bob" { to { -o-transform: translateY(2px) rotate(1deg); transform: translateY(2px) rotate(1deg); }
}
Subtle Animation Example - Script Codes
Subtle Animation Example - Script Codes
Home Page Home
Developer Nick Colley
Username nickcolley
Uploaded November 12, 2022
Rating 3
Size 2,101 Kb
Views 10,120
Do you need developer help for Subtle Animation Example?

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!

Nick Colley (nickcolley) 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!