css| Menu | Web page if the traditional way to make this flip menu, at least to cut the picture into 10 pieces, but also to add JS code, in the Picture button to add behavior, now completely with CSS to achieve, the picture as long as a, see the following figure:
CSS code:
#imgmenu {
width:450px;
height:25px; /* height is half of the background picture * *
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;
/* Flip the position of the background image, left 0px, top -25px,
The lower part of the background image, hereinafter * * *
}
#imgmenu li#about A:hover, #activea {
Background:url (.. /images/navbg.gif) -90px-25px;
/* The position of the second menu is 90px from the left.
The width of each menu is 90px*/
}
<li id= "about" ><a href= "#" ></a></li>
<li id= "Pro" ><a href= "#" ></a></li><li id= "FAQ" ><a href= "#" ></a></li >
<li id= "Contact" ><a href= "#" ></a></li></ul>
Designed to be more considerate, take care of plain text browsing friends: You can set the span element inside Li, add text links, set span in style is not visible.
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.