Div + CSS effect (Achieving smooth voting effect, etc)

Source: Internet
Author: User

The name of this technique isCSS SpriteThe basic principle is to use the background-image, background-repeat, and background-position attributes of the image background series in CSS. In this way, the key to achieving Image Display acceleration is not to reduce the weight, but to reduce the number of images. Generally, the transmission time of an image is much smaller than the request waiting time.

PS: three examples of CSS Sprites have been created. If you are interested, you can take a look.

Instance
For example, Google .cn now uses this method for the bottom navigation of the home page.
Picture used: http://www.ccvita.com/wp-content/uploads/demo/css/google.gif
Effect: http://www.google.cn

Code
I have found several demos on the Internet. You can see the demonstration of the following url: CSS Sprites instance demonstration.
Effect 1: Portrait background image

Effect 2: horizontal background image

Effect 3: smooth voting

 

From: http://www.ccvita.com/322.html#more-322

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.