CSS image flip menu

Source: Internet
Author: User
Tags image flip

If you use the traditional method to create this flip menu, you must at least cut the image into 10 bytes and then upload the image to ipvs.CodeAdd behavior on the image button. Now CSS is fully used for implementation. You only need one image. See.

CSS code:

# Imgmenu {width: pixel PX; Height: 25px;/* The height is half of the background image */Background: URL (.. /images/navbg.gif); List-style-type: none; padding: 0px; margin: 0px;} # imgmenu Li {float: Left;} # imgmenu Li a {display: block; width: 90px; Height: 25px; }# imgmenu li # Home A: hover, # activeh {Background: URL (.. /images/navbg.gif) 0-25px;/* the position of the background image when the image is flipped. The left side is 0px, the top is-25px, and the lower part of the background image is. */} # imgmenu li # About: hover, # activea {Background: URL (.. /images/navbg.gif)-90px-25px;/* The position of the second menu is 90px from the left, and the width of each menu is 90px */} # imgmenu li # Pro A: hover, # activep {Background: URL (.. /images/navbg.gif)-180px-25px;} # imgmenu li # faq a: hover, # activef {Background: URL (.. /images/navbg.gif)-270px-25px;} # imgmenu li # contact A: hover, # activec {Background: URL (.. /images/navbg.gif)-360px-25px ;}
The design is more considerate and takes care of the friends who browse the plain text:

You can set the span element in Li and add a text link to make the span invisible in the style.

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.