zoukankan      html  css  js  c++  java
  • 左边竖条的实现方法

    一:border

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                *{margin:0px;padding:0px;}
                .wrap{width:500px;height:200px;margin:100px auto;}
                .wrap .con{width:400px;height:60px;border-left:5px solid purple;background: #ccc;}
            </style>
        </head>
        <body>
                <div class="wrap">
                    <div class="con"></div>
                </div>
        </body>
    </html>

    二:伪类

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                *{margin:0px;padding:0px;}
                .wrap{width:500px;height:200px;margin:100px auto;}
                .wrap .con{width:400px;height:60px;background: #ccc;}
                .wrap .con:after{display: block;content:"";width:5px;height:60px;background: purple;}
            </style>
        </head>
        <body>
                <div class="wrap">
                    <div class="con"></div>
                </div>
        </body>
    </html>

    三:box-shadow

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                *{margin:0px;padding:0px;}
                .wrap{width:500px;height:200px;margin:100px auto;}
                .wrap .con{width:400px;height:60px;background: #ccc;box-shadow:-5px 0px 0px purple;}
            </style>
        </head>
        <body>
                <div class="wrap">
                    <div class="con"></div>
                </div>
        </body>
    </html>

    四:filter:drop-shadow

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                *{margin:0px;padding:0px;}
                .wrap{width:500px;height:200px;margin:100px auto;}
                .wrap .con{width:400px;height:60px;background: #ccc; -webkit-filter:drop-shadow(-5px 0 0 deeppink);}
            </style>
        </head>
        <body>
                <div class="wrap">
                    <div class="con"></div>
                </div>
        </body>
    </html>

    五:渐变

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style>
                *{margin:0px;padding:0px;}
                .wrap{width:500px;height:200px;margin:100px auto;}
                .wrap .con{width:400px;height:60px;background:-webkit-linear-gradient(left,purple 0px,purple 5px,#ccc 5px)}
            </style>
        </head>
        <body>
                <div class="wrap">
                    <div class="con"></div>
                </div>
        </body>
    </html>
  • 相关阅读:
    uva-442 Matrix Chain Multiplication
    mongodb笔记2
    用MODELLER构建好模型后对loop区域进行自动的优化过程
    Java乔晓松-android的四大组件之一Service(服务的绑定)
    内部排序之交换排序
    C,C++中的static
    [置顶] 贝叶斯分类(一)
    RabbitMQ和kafka从几个角度简单的对比--转
    rabbitmq Clustering Guide--官方
    How To Cluster Rabbit-MQ--reference
  • 原文地址:https://www.cnblogs.com/yang0901/p/6772354.html
Copyright © 2011-2022 走看看