zoukankan      html  css  js  c++  java
  • 仿海棠学院列表效果

    <!DOCTYPE html>
    <html>
    <head lang="en">
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" href="css/2.css"/>
    </head>
    <body>
    <div class="show-list">
        <h1>我是标题</h1>
        <ul>
            <li>
                <div>
                    <span>放下盲目的自信,去找一位好教练</span>
                </div>
            </li>
            <li>
                <div>
                    放下盲目的自信,去找一位好教练
                </div>
            </li>
            <li>
                <div>
                    放下盲目的自信,去找一位好教练
                </div>
            </li>
            <li>
                <div>
                    放下盲目的自信,去找一位好教练
                </div>
            </li>
        </ul>
    </div>
    </body>
    </html>
    html
    @import "public.css";
    .show-list{
        width:400px;
        margin:20px auto;
        border-radius:10px;
        background:#3a404d;
    }
    .show-list h1{
        padding:10px;
        color:#fff;
        font-size: 22px;
    }
    .show-list ul{
        counter-reset: show-list;/*计数器*/
    }
    .show-list li{
        position:relative;
        width:100%;
        font-size:16px;
        counter-increment: item;/*计数器*/
        color:#fff;
        background: green;
        cursor: pointer;
        z-index:100;
        transition:all 0.3s linear
    }
    .show-list li:last-child{
        border-radius:0 0 10px 10px;
    }
    .show-list li div{
        padding:20px 50px;
    }
    .show-list li:before{
        content: counter(item)/*"."*/;/*计数器*/
        display: block;
        position:absolute;
        left:20px;
        top:50%;
        margin-top:-10px;
        width:20px;
        height:20px;
        line-height:20px;
        text-align:center;
        border-radius:50%;
        color:#0b391a;
        background:#fff;
    }
    .show-list li:after{
        content:">";
        position:absolute;
        right:16px;
        top:50%;
        margin-top:-5px;
        width:10px;
        height:10px;
        line-height:10px;
        text-align:center;
        color:#0b391a;
    }
    .show-list li:hover{
        transform:scaleX(1.03)
    }
    .show-list li div:before,.show-list li div:after{
        position:absolute;
        z-index:10;
        content: "";
        width:0;
        height:0;
    }
    .show-list li:nth-child(1) div:before,.show-list li:nth-child(1) div:after{
        bottom: -10px;
        border-top: 10px solid green;
    }
    .show-list li:nth-child(2) div:before,.show-list li:nth-child(2) div:after{
        bottom:-6px;
        border-top: 6px solid green;
    }
    .show-list li:nth-child(3) div:before,.show-list li:nth-child(3) div:after{
        bottom:-2px;
        border-top: 2px solid green;
    }
    .show-list li:nth-child(4) div:before,.show-list li:nth-child(4) div:after{
        top:-6px;
        border-bottom: 6px solid green;
    }
    .show-list li:nth-child(1) div:before{
        left: 0;
        border-left: 10px solid transparent;
    }
    .show-list li:nth-child(1) div:after{
        right: 0;
        border-right: 10px solid transparent;
    }
    .show-list li:nth-child(2) div:before{
        left: 0;
        border-left: 6px solid transparent;
    }
    
    .show-list li:nth-child(2) div:after{
        right: 0;
        border-right: 6px solid transparent;
    }
    .show-list li:nth-child(3) div:before{
        left: 0;
        border-left: 6px solid transparent;
    }
    .show-list li:nth-child(3) div:after{
        right: 0;
        border-right: 6px solid transparent;
    }
    .show-list li:nth-child(4) div:before{
        left: 0;
        border-left: 6px solid transparent;
    }
    .show-list li:nth-child(4) div:after{
        right: 0;
        border-right: 6px solid transparent;
    }
    2.css
  • 相关阅读:
    西子凌波26: 看各路新秀 2015-04-19
    西子凌波21:美元 2015-03-19
    西子凌波04:再读 教你炒股票104:几何结构与能量动力结构1有感 2011-05-23
    西子凌波08:闲聊~~共勉~~ 感恩缠主 2013-12-07
    西子凌波07:传统底部形态缠论解析 2011-10-26
    西子凌波03:缠论中的MACD 2011-05-21
    数组内Merge
    leetcode -- Decode Ways
    leetcode -- Distinct Subsequences
    leetcode -- permutation 总结
  • 原文地址:https://www.cnblogs.com/dongxiaolei/p/6721403.html
Copyright © 2011-2022 走看看