亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

搜索
博主信息
博文 21
粉絲 0
評論 0
訪問量 24443
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板
圖片輪播及TAB切換
電動機的博客
原創(chuàng)
832人瀏覽過

//TAB切換

<!DOCTYPE html>
<html>
<head>
 <title>tab切換</title>
 <style type="text/css">
  .box{
   width: 500px;
   height: 300px;
   margin: 50px auto;
   background-color: pink;
   position: relative;
   /*overflow: hidden; *//*超出box大小的圖片隱藏*/
   /*position: relative;相對定位 */
    }
  ul{width: 460px;
   height: 30px;
   margin: 50px auto;
   background-color: #ccc;
  }
  li{
   list-style: none;
   float: left;
   width: 100px;
   height: 28px;
   line-height: 28px;
   border: 1px solid #bbb;
   border-top-left-radius: 20%;
            border-top-right-radius: 20%;
   cursor: pointer;

  }
  li:hover {background-color: red;}
  .photo{
   width: 500px;
   height: 210px;
   margin: 0px auto;
   overflow: hidden;
   position: absolute;
  }
  span{
   display: inline-block;
   width: 500px; height: 20px;
   margin: 80px auto;
   text-align: center;
      font-size:30px; }
  
 </style>
</head>
<body>
    <div class="box">

        <ul>
         <li onclick="tab(0)">tab1</li>
         <li onclick="tab(1)">tab1</li>
         <li onclick="tab(2)">tab1</li>
        </ul>
        <span>我是誰?</span>
        <script type="text/javascript">
            function tab(i){
             var a=['我是TAB1','我是TAB2','我是TAB3']
         
                var Espan=document.getElementsByTagName('span')[0]
            
                        Espan.innerHTML=a[i];
               
            }
        </script>
       
       
   </div>
  </div>
 </script>
   </body>
</html>

1553834700561256.jpg

//輪播動畫


<!DOCTYPE html>
<html>
<head>
 <title>輪播動畫</title>
 <style type="text/css">
  .box{
   width: 500px;
   height: 300px;
   margin: 50px auto;
   overflow: hidden; /*超出box大小的圖片隱藏*/
   position: relative;/*相對定位*/
  }
  img{width: 500px;height: 300px;}
  p{
   color: #fff;
   width: 500px;height: 30px;
   position: absolute;z-index: 1000;bottom: 0;left:0; /*絕對定位*/
   text-align: center;
   line-height: 30px;
  }
  p span{
   display: inline-block;/*轉換成塊級元素可以設置高度*/
   width: 20px; height: 20px;
   text-align: center;
   background: rgba(254,254,254,0.6);
   border-radius: 50%;
   line-height: 20px;
   cursor: pointer; /*鼠標指到時小手的效果*/
  }
 </style>
</head>
<body>
   <div class="box" id="photo">
        <a href=""><img src="images/1.jpg"></a>
     <a href=""><img src="images/2.jpg"></a>
     <a href=""><img src="images/3.jpg"></a>
     <a href=""><img src="images/4.jpg"></a>
  <a href=""><img src="images/5.jpg"></a>
  <p>
     <span onclick="change(0)">1</span>
     <span onclick="change(1)">2</span>
     <span onclick="change(2)">3</span>
     <span onclick="change(3)">4</span>
     <span onclick="change(4)">5</span>
  </p>
   </div>

   <script type="text/javascript">
        function change(num){
         var obj=document.getElementById('photo')
         var obj_a=obj.getElementsByTagName('a');
         for(var i=0;i<obj_a.length;i++){
          obj_a[i].style.display="none";
         }
           obj_a[num].style.display="block";
       }
 </script>
   </body>
</html>

 1553834635140452.jpg

批改狀態(tài):未批改

老師批語:
本博文版權歸博主所有,轉載請注明地址!如有侵權、違法,請聯(lián)系admin@php.cn舉報處理!
全部評論 文明上網(wǎng)理性發(fā)言,請遵守新聞評論服務協(xié)議
0條評論
作者最新博文
關于我們 免責申明 意見反饋 講師合作 廣告合作 最新更新
php中文網(wǎng):公益在線php培訓,幫助PHP學習者快速成長!
關注服務號 技術交流群
PHP中文網(wǎng)訂閱號
每天精選資源文章推送
PHP中文網(wǎng)APP
隨時隨地碎片化學習
PHP中文網(wǎng)抖音號
發(fā)現(xiàn)有趣的

Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號

  • 登錄PHP中文網(wǎng),和優(yōu)秀的人一起學習!
    全站2000+教程免費學