Home » » Membuat Google Doodle dengan CSS 3

Membuat Google Doodle dengan CSS 3

google doodle horse animasi
Masih ingat dengan gambar yang disamping ini ??? tentu saja yang sering buka google pasti masih ingat.

Setiap ada even Google sangat kreatif membuat animasi-animasi. Kita cuman bisa mengaguminya saja tapi tidak tahu cara pembuatannya.

Kemarin saya menemukan tutorialnya, kali ini saya akan tulis ulang dalam bahasa indonesia.

Untuk membuatnya kalian harus mempersiapkan image-image ini ::

doodle horse
Foto kuda
efek frame horse
Frame
image play
Image Play

kemudian kalian buat file htmlnya, tulis code seperti dibawah ini ::

 
<html>
<head>
<link href="file.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="logo">
 <div class="frame">
  <img src="muybridge12-hp-v.png" />
 </div>
 
 <!-- The play button now -->
 <label for="play_button" id="play_label"></label>
 <input type="checkbox" id="play_button" name="play_button" />
 
 <!-- The image for the play button 
 The sibling selector works in the forward direction only.-->
 <span id="play_image">
  <img src="muybridge12-hp-p.jpg" />
 </span>
 
 <div class="horse"></div>
 <div class="horse"></div>
 <div class="horse"></div>
</div>
</body>
</html>


Foto kuda, frame, Image Play harus satu folder dengan htmlnya.

selanjutnya kita tinggal membuat cssnya dengan nama file.css, ikuti source code dibawah ini ::

 
* {margin: 0; padding: 0;}

#logo {position: relative;}

.horse {
 width: 469px; height: 54px;
 background: url(muybridge12-hp-f.jpg);
}

.frame {position: absolute; left: 0; top: 0; z-index: 1;}

/*Clicking the label will select the checkbox which will be used to
trigger the animation of the horses*/

#play_button:checked ~ .horse {
 -webkit-animation: horse-ride 0.5s steps(12, end) infinite;
 -webkit-animation-delay: 2.5s;
 -moz-animation: horse-ride 0.5s steps(12, end) infinite;
 -moz-animation-delay: 2.5s;
 /*Lets add a pre-anim which will start slowly and merge into the fast animation*/
 background-position: -2412px 0;
 -webkit-transition: all 2.5s cubic-bezier(0.550, 0.055, 0.675, 0.190);
 -moz-transition: all 2.5s cubic-bezier(0.550, 0.055, 0.675, 0.190);
}

/*Hide the play image*/
#play_button:checked ~ #play_image img{
 left: -68px;
 -webkit-transition: all 0.5s ease-in;
 -moz-transition: all 0.5s ease-in;
}

/*804px is the width of the image with 12 horse frames
steps are used in the animation to have the best animation effect
it will position the horse frames accurately in the boxes instead of 
tweening it px by px all the way through*/
@-webkit-keyframes horse-ride {
 0% {background-position: 0 0;}
 100% {background-position: -804px 0;}
}
@-moz-keyframes horse-ride {
 0% {background-position: 0 0;}
 100% {background-position: -804px 0;}
}

#play_button {display: none;}
#play_label {
 width: 67px; height: 54px;
 display: block;
 position: absolute; left: 201px; top: 54px; z-index: 2;
}
#play_image {position: absolute; left: 201px; top: 54px; z-index: 0;
 overflow: hidden; width: 68px; height: 55px;
}
#play_image img {position: absolute; left: 0; top: 0;}


Selesai.

Bagaimana mudah sajakan ???

Salam Hangat


Roy Purbo

71 comments:

  1. I would like to suggest your blog in my dude circle. please keep on updates. hope it might be much useful for us.
    goldenslot

    ReplyDelete
  2. I¡¦ve recently started a blog, the info you provide on this website has helped me tremendously. Thanks for all of your time & work.


    Situs Togel Resmi

    ReplyDelete
  3. Kami melayanani pembuatan website, seo, maintenance website. hingga pembuatan aplikasi android dan website sistem informasi Jasa Website Profesional

    ReplyDelete
  4. thank you
    https://roypurbo.blogspot.com/2013/04/membuat-google-doodle-dengan-css-3_28.html?showComment=1570263001006#c8289853829690963846

    ReplyDelete
  5. thank you
    https://roypurbo.blogspot.com/2013/04/membuat-google-doodle-dengan-css-3_28.html?showComment=1570263001006#c8289853829690963846

    ReplyDelete
  6. Thank you. Your article is very good.

    Welcome to the website.

    edok2519.bloggosite.com

    ReplyDelete
  7. It's really interesting We will try to do it. It will definitely come out well. Thank you. You made us very amazed. You came out amazing. Click

    ReplyDelete
  8. Great post but I was wondering if you could write a little more on this subject? I’d be very thankful if you could elaborate a little bit further. Thanks in advance! Interested in playing games for real money. Click >>>
    www.evernote.com

    ReplyDelete
  9. Peter Schmeichel Manchester United has blamed David de Gea, one of the current goalkeepers, for not having enough concentration to play. Until causing too many mistakes knjpkj.livebloggs.com

    ReplyDelete
  10. disappear from the game สมัครแทงบอล Antony Marciac 5.5 The ball reaches him quite a bit, so try to come down to get the ball low often Speed and movement can still cause some problems. But overall, it still

    ReplyDelete
  11. Hi there, just wanted to say, I loved this blog post.
    It was practical. Keep on posting!
    edok9.blogpostie.com

    ReplyDelete
  12. You have outdone yourself this time. It is probably the best, most short step by step guide that I have ever seen.
    medium.com

    ReplyDelete
  13. This is a very good article, so I will not miss reading it, so I can get insight. And Here we will share information about tips on harmony with couples in a family >>>
    5e6891411e00d.site123.me

    ReplyDelete
  14. เว็บดูซีรี่ย์ออนไลน์เพื่อความบันเทิงผ่อนคลายจากการทำงาน แนะนำเว็บ เว็บดูซีรี่ย์ฟรี

    ReplyDelete
  15. Why is it still classi If you hawaiian shirt men say that the Hawaiian shirt is another successful fashion, it is probably not wrong. One of the reasons that Hawaiian shirts were worn and never dropped in trend was
    รถ6ล้อ รถแม็คโครให้เช่า
    เสื้อฮาวาย

    ReplyDelete