Created
August 15, 2014 03:35
-
-
Save tutweb/ae0b158069e5cd3b2a4f to your computer and use it in GitHub Desktop.
Membuat Animasi Background Website Dengan CSS3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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