Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Membuat Animasi Background Website Dengan CSS3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Animasi Background CSS3</title>
<style>
body{
background-color: #f1c40f;
-webkit-animation: color 5s ease-in 0s infinite alternate running;
-moz-animation: color 5s linear 0s infinite alternate running;
animation: color 5s linear 0s infinite alternate running;
}
/* Animasi + Prefix untuk browser */
@-webkit-keyframes color {
0% { background-color: #f1c40f; }
32% { background-color: #e74c3c; }
55% { background-color: #9b59b6; }
76% { background-color: #16a085; }
100% { background-color: #2ecc71; }
}
@-moz-keyframes color {
0% { background-color: #f1c40f; }
32% { background-color: #e74c3c; }
55% { background-color: #9b59b6; }
76% { background-color: #16a085; }
100% { background-color: #2ecc71; }
}
@keyframes color {
0% { background-color: #f1c40f; }
32% { background-color: #e74c3c; }
55% { background-color: #9b59b6; }
76% { background-color: #16a085; }
100% { background-color: #2ecc71; }
}
h1{
margin: 0;
text-transform: uppercase;
font-family: 'halvetica', sans-serif;
color: #ecf0f1;
font-size: 30pt;
text-align: center;
line-height: 350px;
letter-spacing: 0.2em
}
p{
text-align: center;
}
a{
text-decoration: none;
color: #333;
}
</style>
</head>
<body>
<div class="content">
<h1>Tutorial Web Design Indonesia</h1>
<p>Back to tutorial at <a href="http://www.tutorial-webdesign.com/membuat-animasi-backround-website-barubah-ubah-warna">http://www.tutorial-webdesign.com</a></p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.