国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

JS實現的不規則TAB選項卡效果代碼

2019-11-20 11:32:58
字體:
來源:轉載
供稿:網友

本文實例講述了JS實現的不規則TAB選項卡效果代碼。分享給大家供大家參考。具體如下:

這是一款采用菱形的選項卡效果,一改選項卡中規中矩的風格,效果非常不錯,奉獻給大家。

運行效果截圖如下:

在線演示地址如下:

http://demo.VeVB.COm/js/2015/js-bgz-tab-cha-style-codes/

具體代碼如下:

<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>不規則TAB選項卡效果</title><style type="text/css"><!--body,td{font-size: 12px;}.tab{margin-top:100px}#TabTab03Con1{width:346px;height:100px;line-height:100px;border-left:#757575 1px solid;border-bottom:#757575 1px solid;border-right:#757575 1px solid;}#TabTab03Con2{width:346px;height:100px;line-height:100px;border-left:#757575 1px solid;border-bottom:#757575 1px solid;border-right:#757575 1px solid;}#TabTab03Con3{width:346px;height:100px;line-height:100px;border-left:#757575 1px solid;border-bottom:#757575 1px solid;border-right:#757575 1px solid;}.xixi1{width:346px;height:27px;line-height:27px;background-image:url(images/tab01.jpg);cursor:pointer;}.xixi2{width:346px;height:27px;line-height:27px;background-image:url(images/tab02.jpg);cursor:pointer;}.xixi3{width:346px;height:27px;line-height:27px;background-image:url(images/tab03.jpg);cursor:pointer;}.tab1{width:115px;height:27px;line-height:27px;float:left;text-align:center;cursor:pointer;}.tab2{width:115px;height:27px;line-height:27px;float:left;text-align:center;cursor:pointer;color:#FFFFFF;}.tab3{width:115px;height:27px;line-height:27px;float:left;text-align:center;cursor:pointer;color:#FFFFFF;}--></style></head><body style="text-align:center"><script type=text/javascript> function setTab03Syn ( i ) {  selectTab03Syn(i); } function selectTab03Syn ( i ) {  switch(i){   case 1:   document.getElementById("TabTab03Con1").style.display="block";   document.getElementById("TabTab03Con2").style.display="none";   document.getElementById("TabTab03Con3").style.display="none";   document.getElementById("font1").style.color="#000000";   document.getElementById("font2").style.color="#ffffff";   document.getElementById("font3").style.color="#ffffff";   break;   case 2:   document.getElementById("TabTab03Con1").style.display="none";   document.getElementById("TabTab03Con2").style.display="block";   document.getElementById("TabTab03Con3").style.display="none";   document.getElementById("font1").style.color="#ffffff";   document.getElementById("font2").style.color="#000000";   document.getElementById("font3").style.color="#ffffff";   break;   case 3:   document.getElementById("TabTab03Con1").style.display="none";   document.getElementById("TabTab03Con2").style.display="none";   document.getElementById("TabTab03Con3").style.display="block";   document.getElementById("font1").style.color="#ffffff";   document.getElementById("font2").style.color="#ffffff";   document.getElementById("font3").style.color="#000000";   break;  } }</script><div class="tab"> <div id="bg" class="xixi1">  <div id="font1" class="tab1" onMouseOver="setTab03Syn(1);document.getElementById('bg').className='xixi1'">查詢廣告企業</div>  <div id="font2" class="tab2" onMouseOver="setTab03Syn(2);document.getElementById('bg').className='xixi2'">查詢媒體刊例</div>  <div id="font3" class="tab3" onMouseOver="setTab03Syn(3);document.getElementById('bg').className='xixi3'">查詢供求商情</div> </div> <div id=TabTab03Con1>不規則TAB選項卡效果</div> <div id=TabTab03Con2 style="display:none">內容2</div> <div id=TabTab03Con3 style="display:none">內容3</div></div></body></html>

希望本文所述對大家的JavaScript程序設計有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 板桥市| 宜兰市| 措美县| 特克斯县| 罗平县| 亳州市| 维西| 宜兴市| 丰镇市| 武乡县| 巧家县| 沾益县| 塔城市| 阜南县| 关岭| 年辖:市辖区| 申扎县| 娄底市| 修水县| 玛多县| 桐梓县| 金寨县| 梓潼县| 永嘉县| 临沭县| 烟台市| 漳州市| 小金县| 桦川县| 乐清市| 皮山县| 舒兰市| 葫芦岛市| 隆德县| 岱山县| 通渭县| 察隅县| 城市| 灵石县| 西城区| 姚安县|