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

首頁 > 編程 > JavaScript > 正文

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

2019-11-20 11:33:41
字體:
來源:轉載
供稿:網友

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

這是一款不規則TAB選項卡效果,將中規中矩的方角換成了不規則的圓角,也就是這一換,倒讓瀏覽者新鮮了不少,也使選項卡增多了幾份靈感,不是嗎?

運行效果截圖如下:

在線演示地址如下:

http://demo.VeVB.COm/js/2015/js-box-tab-nav-style-menu-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}#TabCon1{width:212px;height:100px;line-height:100px;border-left:#757575 1px solid;border-bottom:#757575 1px solid;border-right:#757575 1px solid;}#TabCon2{width:212px;height:100px;line-height:100px;border-left:#757575 1px solid;border-bottom:#757575 1px solid;border-right:#757575 1px solid;}.xixi1{width:212px;height:29px;line-height:29px;background-image:url(images/news_bghover1.gif);cursor:pointer;}.xixi2{width:212px;height:29px;line-height:29px;background-image:url(images/news_bghover2.gif);cursor:pointer;}.tab1{width:96px;height:29px;line-height:29px;float:left;text-align:center;cursor:pointer; color:#FFF;}.tab2{width:116px;height:29px;line-height:29px;float:left;text-align:center;cursor:pointer;color:#000;}--></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("TabCon1").style.display="block";   document.getElementById("TabCon2").style.display="none";   document.getElementById("font1").style.color="#ffffff";   document.getElementById("font2").style.color="#000000";   break;   case 2:   document.getElementById("TabCon1").style.display="none";   document.getElementById("TabCon2").style.display="block";   document.getElementById("font1").style.color="#000000";   document.getElementById("font2").style.color="#ffffff";   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><div id="TabCon1">不規則TAB選項卡效果</div><div id="TabCon2" style="display:none">不規則TAB選項卡效果2</div></div></body></html>

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 长岛县| 东安县| 河南省| 定南县| 邯郸县| 伊吾县| 利辛县| 河南省| 霍山县| 来安县| 美姑县| 百色市| 子长县| 腾冲县| 陆良县| 布拖县| 长春市| 连南| 怀安县| 炉霍县| 大洼县| 德阳市| 澎湖县| 绩溪县| 巴楚县| 秀山| 喀喇| 呼和浩特市| 梁平县| 德令哈市| 大庆市| 忻州市| 枣强县| 阿瓦提县| 鲁甸县| 隆化县| 太谷县| 库伦旗| 美姑县| 威远县| 广南县|