茄子在线看片免费人成视频,午夜福利精品a在线观看,国产高清自产拍在线观看,久久综合久久狠狠综合

    <s id="ddbnn"></s>
  • <sub id="ddbnn"><ol id="ddbnn"></ol></sub>

  • <legend id="ddbnn"></legend><s id="ddbnn"></s>

    javascript實(shí)現(xiàn)不同顏色Tab標(biāo)簽切換效果
    來源:易賢網(wǎng) 閱讀:1638 次 日期:2016-07-06 14:23:28
    溫馨提示:易賢網(wǎng)小編為您整理了“javascript實(shí)現(xiàn)不同顏色Tab標(biāo)簽切換效果”,方便廣大網(wǎng)友查閱!

    這篇文章主要為大家詳細(xì)介紹了javascript實(shí)現(xiàn)不同顏色Tab標(biāo)簽切換效果,具有一定的參考價值,感興趣的小伙伴們可以參考一下

    本文實(shí)例為大家分享了javascript不同顏色Tab標(biāo)簽切換效果的實(shí)現(xiàn)代碼,供大家參考,具體內(nèi)容如下

    名單

    具體代碼:

    <html>

     <head>

     <title>不同顏色選項卡</title>

     <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>

     <style type="text/css">

      * {

        margin: 0;

        padding: 0;

      }

      body {

        font: 12px/20px 'microsoft yahei', 'arial';

        word-break: break-all;

        word-wrap: break-word;

      }

      .clearfix:after {

        content: '.';

        display: block;

        clear: both;

        height: 0;

        visibility: hidden;

      }

      .clearfix {

        display: inline-block;

      }

      * html .clearfix {

        height: 1%;

      }

      .clearfix {

        display: block;

      }

      #wrap {

        width: 320px;

        margin: 2em auto;

      }

      .card_List {

        height: 30px;

        border-bottom: 1px solid #f00;

        position: relative;

      }

      .card_List li {

        float: left;

        width: 68px;

        text-align: center;

        height: 30px;

        line-height: 30px;

        margin: 0 5px;

        display: inline;

        border-top-left-radius: 6px;

        border-top-right-radius: 6px;

      }

      .card_List li.current {

        height: 34px;

        line-height: 34px;

        margin-top: -4px;

        border: 1px solid #F00;

        background: #FF9494;

        border-bottom: none;

        color: #fff;

      }

      #oLi li:nth-child(1){

        background: #FF9494;

      }

      #oLi li:nth-child(2){

        background: #8CFE8C;

      }

      #oLi li:nth-child(3){

        background: #6969FB;

      }

      #oLi li:nth-child(4){

        background: #FFE26F;

      }

      .card_content div {

        display: none;

        height: 100px;

        text-align: center;

        color: #000;

      }

      .card_content div:first-child {

        background: #fff;

      }

     </style>

     <script type="text/javascript">

      window.onload = function () {

        var colorArr = {

          0:"#f00",

          1:"#0f0",

          2:"#00f",

          3:"#FC0"

        };

        var bgColorArr = {

          0:"#fff",

          1:"#fff",

          2:"#fff",

          3:"#fff",

        }

        var oL = document.getElementById("oLi");

        var oLi = oL.getElementsByTagName("li");

        var oUl = document.getElementById("oUl").getElementsByTagName("div");

        for ( var i=0 ; i<oLi.length ; i++ ){

          oLi[i].index = i;

          oLi[i].onclick = function () {

            for ( var j = 0 ; j < oLi.length ; j++ ){

              oLi[j].className = "";

              oLi[j].style.border = "none";

            }

            this.className = "current";

            this.style.border = "1px solid " + colorArr[this.index];

            this.style.borderBottom = "none";

            oL.style.borderBottom = "1px solid " + colorArr[this.index];

            for ( var j=0 ; j < oUl.length ; j++ ){

              oUl[j].style.display = "none";

              oUl[this.index].style.display = "block";

              oUl[j].style.backgroundColor = bgColorArr[this.index];

            }

          };

        }

      };

     </script>

     </head>

     <body>

      <div id="wrap">

        <ul id="oLi" class="card_List clearfix">

          <li class="current">1</li>

          <li>2</li>

          <li>3</li>

          <li>4</li>

        </ul>

        <div id="oUl" class="card_content">

          <div style="display:block;">

            11111111111111

          </div>

          <div>

            22222222222

          </div>

          <div>

            3333333333333

          </div>

          <div>

            44444444444444444

          </div>

        </div>

      </div>

     </body>

    </html>

    以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助。

    更多信息請查看網(wǎng)絡(luò)編程
    易賢網(wǎng)手機(jī)網(wǎng)站地址:javascript實(shí)現(xiàn)不同顏色Tab標(biāo)簽切換效果
    由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

    2026上岸·考公考編培訓(xùn)報班

    • 報班類型
    • 姓名
    • 手機(jī)號
    • 驗證碼
    關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機(jī)站點(diǎn) | 投訴建議
    工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號
    云南網(wǎng)警備案專用圖標(biāo)
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號:hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
    云南網(wǎng)警報警專用圖標(biāo)