CSS tab tabs

Source: Internet
Author: User

The CSS Tab tab is said to be implemented in 2 ways

1. Target CSS3

2. A stroke.

The core principle of 2 is to use the stroke to display the problem (stroke parent overflow).

 <style> body,div,ul,li{margin:0; padding:0; font-size:12px;}            . tab_ul{margin:10px Auto 0;            padding-left:20px;            width:228px;            height:31px;            border:1px solid #DBA4E8;        border-bottom:0;}        . Tab_ul li{float:left; display:inline; margin:5px 0 0 5px; width:46px; height:26px;}        . tabdiv{margin:0 Auto; width:248px; height:200px;border:1px solid #DBA4E8; border-top:0; overflow:hidden;}        . tabdiv ul{margin:0 Auto 0; padding-top:10px; width:218px; height:190px;}    . tabdiv ul li{height:24px; text-align:right; color: #666666; font-size:12px;} </style><ul class= "Tab_ul" > <li><a href= "#ul1" > Food </a></li> <li><a href = "#ul2" > Entertainment </a></li> <li><a href= "#ul3" > Shopping </a></li> <li><a href= "# Ul4 "> Accommodation </a></li></ul><div class=" Tabdiv "> <ul id=" ul1 "> <li>1111111111111 1111</li> </ul> <ul id= "Ul2" > <li>2222222222222</li> </ul> <ul id= "ul 3 "> <li>333333333333</li> </ul> <ul id=" Ul4 "> &LT;LI&GT;4444444444&LT;/LI&G    T </ul></div>

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.