zoukankan      html  css  js  c++  java
  • 纯css3 实现的焦点图

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>six</title>
    <script type="text/javascript" src="https://qunarzz.com/jquery/prd/jquery-1.7.2.js"></script>
    <style>
    body{
    margin:0;
    padding:0;
    }
    table{border-collapse:collapse;}
    th{background:#000;color:#fff;}
    tbody> tr{color:#000;line-height:22px;}
    tbody> tr > td,tr > th{border-right:2px solid #fff;}
    tbody> tr:nth-child(even){background:#ccc;}
    tbody> tr:nth-child(odd){background:#eee;}
    /*tbody> tr:nth-child(1),tbody> tr:nth-child(2),tbody> tr:nth-child(3){color:red;}*/
    /*input{100px;}*/
    .text{100px;transition: width .8s;}
    .text:focus{250px;}

    .labels > a:link,
    .labels > a:hover,
    .labels > a:visited {
    color: #ccc;
    text-decoration: none;
    }

    .slides {
    position: relative;
    350px;
    height: 140px;
    overflow: hidden;
    background-color: #ccc;
    }

    .slide-wrap {
    position: relative;
    300%;
    height: 100%;
    transition: left .8s ease;
    }

    .slide {
    float: left;
    33.3%;
    height: 100%;
    }

    .slide:first-child {
    background-color: red;
    }

    .slide:nth-child(2) {
    background-color: blue;
    }

    .slide:nth-child(3) {
    background-color: green;
    }

    #slide1:target ~ .slide-wrap {
    left: 0;
    }

    #slide2:target ~ .slide-wrap {
    left: -100%;
    }

    #slide3:target ~ .slide-wrap {
    left: -200%;
    }

    .labels {
    position: absolute;
    right: 0;
    bottom: 0;
    }

    .labels > a {
    display: block;
    30px;
    height: 30px;
    float: left;
    line-height: 30px;
    text-align: center;
    background-color: rgba(0, 0, 0, .2);
    border: 1px solid transparent;
    }


    </style>
    </head>
    <body>
    <table width="300px" cellpadding="0" cellspacing="0">
    <thead>
    <tr>
    <th>排名</th>
    <th>网站</th>
    <th>热度</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>1</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>2</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>3</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>4</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>5</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>6</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>7</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>8</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>9</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    <tr>
    <td>10</td>
    <td>百度前端技术学院</td>
    <td>13000</td>
    </tr>
    </tbody>
    </table>
    <br/>
    <br/>
    <input type="text" name="user" class="text">
    <br/><br/><br/>

    <script>
    $(function(){
    $("tbody > tr:lt(3)").css("color","red");
    // $('input[name="user"]').focus(function(){
    // $(this).animate({"300px"},"swing");
    // }).blur(function(){
    // $(this).animate({"100px"},"swing");
    // })
    })
    </script>

    <br/><br/>

    <div class="slides">
    <span id="slide1" hidden></span>
    <span id="slide2" hidden></span>
    <span id="slide3" hidden></span>
    <div class="slide-wrap">
    <div class="slide"></div>
    <div class="slide"></div>
    <div class="slide"></div>
    </div>
    <div class="labels">
    <a href="#slide1">1</a>
    <a href="#slide2">2</a>
    <a href="#slide3">3</a>
    </div>
    </div>
    </body>
    </html>

  • 相关阅读:
    P1361 小M的作物 【网络流】【最小割】
    餐巾计划问题 【网络流24题】【费用流】【zkw】
    P1231 教辅的组成 【网络流】【最大流】
    Rikka with coin 思维题
    线段树模板新
    AC自动机 洛谷P3966 单词
    AC自动机 洛谷P5357 模板
    AC自动机 洛谷P3796
    AC自动机 洛谷P3808 模板
    KMP 洛谷P3375
  • 原文地址:https://www.cnblogs.com/ll-taj/p/6170700.html
Copyright © 2011-2022 走看看