本文分享一个能够实现自动切换的选项卡功能,并给出它的具体实现过程。
关于选项卡大家一定不会陌生,应用非常的频繁,通常选项卡都是需要点击或者划过才能够实现切换。
代码实例如下:
tab切换 body,h2,p{ margin:0px; padding:0px; }ul,li{ margin:0px; padding:0px; float:left; list-style-type:none; } body{font-size:12px;} .box{ width:722px; height:99px; margin:10px auto; border:1px solid #dedede; } .list{ width:711px; height:22px; float:left; padding:4px 0 0 9px; border-top:1px solid #fff; border-left:1px solid #fff; border-right:1px solid #fff; } .list li{ width:74px; height:22px; float:left; cursor:pointer; color:#656565; line-height:22px; text-align:center; } .list li.hove{ width:72px; height:20px; color:#fc6703; line-height:20px; border-top:1px solid #dedede; border-left:1px solid #dedede; border-right:1px solid #dedede; border-bottom:1px solid #fff; background:#fff; } .content{ width:722px; height:72px; float:left; display:none; }


