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: