CSS Web Design example: Business Travel net homepage Tab switching

Source: Internet
Author: User
Tags net

Article Introduction: CSS Web Design example: Travel Network tab to switch the first page.

Last month's project ... There are many ways to switch tabs, and here's a piece of code that I personally like to use:

<ul class= "Tabmenu" >
<li class= "Menu_flt" > Ticket </li>
< li> hotels </li>
< li> tourist vacation </li>
</ul>

For web standardization, this structure is very clear, when the picture does not show the same can know the text content, but also conducive to SEO. The background picture is divided into two pieces: on and off, combined together, as shown in the figure:

The entire module of the bottom fillet also merged into the picture, this section of code does not include, please ignore ~ ~ ~

1. Give <ul> add the above background, the default is off state, and each <li> plus the corresponding on style. Through JS to determine which menu highlighting, omitting <a> tags;
2. Li's height is set to zero, so that the text in HTML will not show, and then Padding-top, the height of the back. Individuals do not recommend Text-indent:xxxxem, and <a> will see that the focus box has exceeded the screen.

Attached style:

. tabmenu {width:396px; height:37px background: #c6d9f6 URL ("un_tabmenu.gif") no-repeat 0 0;}
. tabmenu li {float:left; display:inline; width:132px; height:0; overflow:hidden; padding-top:37px; cursor:pointer; }
. tabmenu Li.menu_flt {background:url ("un_tabmenu.gif") No-repeat 0-37px;}
. tabmenu Li.menu_hotel {background:url ("un_tabmenu.gif") no-repeat-132px-37px;}
. tabmenu li.menu_pkg {background:url ("un_tabmenu.gif") no-repeat-264px-37px;}

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.