CSS blend style buttons No lag flip graphics tips

Source: Internet
Author: User

Add CSS-style text to a button with a graphical background, which combines the development speed and efficiency of CSS rollover (CSS rollover) markup to effectively improve the three-dimensional effect of the button's exterior image.

These graphic/css hybrid buttons can be easily built and loaded compared to the regular graphical buttons, because you only need to create and load an image for the blank button outside, instead of creating individual images for each button. Anshan treatment psoriasis which hospital best www.0412n.com

The same image can be used in the background of all buttons on the page. The text label of the button is simple CSS style text.

Pre-loaded

One of the few problems with graphic/css blending style is the limitation of tumbling effect. The simplest way to use this technique is to specify the rollover effect of the CSS style text and use the same button outline image for all tumbling states (rollover states). This can give you a quick, concise rollover effect, but limits your development options to some extent.

You can also create some alternate button images and build your CSS rules to change the background image for different rollover states. However, these methods give you more flexible design, but when the browser loads the image file for the first time, these alternating ammonium button images can be delayed (unless you use the method of pre-loading the button image).

Pre-loaded image technology has been well known and accepted by people. The problem is that preloaded images increase the time the page loads and appears in the visitor's browser. The 12th minute of user access is very critical, so you have to make the initialization of the Web page faster anyway. Using the graphical/CSS blend button reduces the time that the image is preloaded, although the initialization of the page is faster if pre-loading can be eliminated. Anshan first big Dermatosis hospital www.0412n.com

No lag tumbling--no preload image used

I have found an innovative method that can meet the different rollover states of alternating button images without the need for any image file to be loaded. The first time I contacted this technology was found on the Web site of the Czech Petr Stanicek.

To get a typical button rollover effect, you usually need to create three separate images, as shown in a. One is the normal button, one is the suspended state, and one is the active state. The image file for the normal button will be part of the initialization page load, but the other two images will be loaded separately so that they can be used in the user's browser.

No pre-load tumbling technology is achieved by combining all three button exterior images into a single image file, as shown in B. However, you do not need to specify a different background image file for each tumbling state, and you specify the position offset of the composite image. In the process of page initialization loading, the composite image file can be loaded automatically, so there is no need to preload it, and there is no time delay in the process of getting different image files from the browser.

The combination of a large image and the position offset of the background image allows you to selectively display different parts of the image for each button state. The size of the CSS box for the button text determines the percentage of the background image that is displayed in the browser.

For this technique, you must be aware of the exact horizontal and vertical dimensions of the button's appearance, and use these dimensions correctly to create CSS rules for image files and buttons.

CSS blend style buttons No lag flip graphics tips

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.