Code _ javascript skills for implementing the animation navigation effect using javascript

Source: Internet
Author: User
Code that uses javascript to implement the animation navigation effect. Who is using this navigation?
Google is a big company with footprints on google all over the world. google animation in South Korea has a very good effect. Someone has dug up the blue ideal forum. Unfortunately, there are too many js files, write one by yourself? Okay, that's it!
Principle
When I was a child, I always liked watching cartoons. How did cartoons come about? I remember my mom said it was a painting and switched over (ah? How many paintings will the Hulu brother draw? -_-! In fact, we are doing the same thing now. Using an image, there are many small images in this image to show the animation track. Moving the image by time, isn't the picture moving? (I don't know. I'm clear... Chinese is very important !!)
Preparation
We need an image, a brain, and a smiling face (the smile effect will be lost ....)!! Below is the picture I prepared (ps level is limited ^_^ )...

Code

We can see the picture above. Imagine how beautiful it is to be moved...

Css

The Code is as follows:



. Gnb_btn_p {
Width: 90px;
Height: 75px;
Overflow: hidden;
Display: block;
Position: absolute;
}

. Gnb_btn_img {
Width: 100%;
Height: 525px;
Display: block;
Overflow: hidden;
Text-indent:-500px;
}
# Gnb_btn_01. Gnb_btn_img {
Background-image: url (http://www.wler.cn/blog/img/friend.gif)
}


Javascript

The Code is as follows:


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.