Written By Apep Wahyudin on Tuesday 28 April 2015 | 13:47

OKE karena nggak bisa nulis banyak untuk intronya, silahkan ditulis syntax berikut ini untuk membuat animasi background berubah warna 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>Long Scripts</h1>
    <p>Back to tutorial at <a href="http://longscripts.blogspot.com/">http://longscripts.blogspot.com/</a></p>

</div>
</body>
</html>
 

Klik link di bawah ini untuk melihat demonya :
DEMO

G+

2 Komentar untuk "Membuat Background Berganti Warna CSS3"

  1. Mantap gan, ini ane bagi blog directory indo baru gratis 100%
    bitKul.Com

    ReplyDelete

Copyright Long Scripts © 2014. All Rights Reserved.
Template SimpleCips By SEOCIPS.COM ,
Powered By Blogger
DMCA.com Protection Status
TopBlogIndonesia.com