京东秒杀模块——css三角形妙用

京东秒杀模块——css三角形妙用

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>价格秒杀-css三角形</title>
    <style>
        .box {
            position: relative;
            width: 140px;
            height: 20px;
            margin: 100px auto;
        }
        
        .box .left {
            float: left;
            width: 80px;
            height: 100%;
            background-color: red;
            color: #fff;
        }
        
        .box .right {
            float: right;
            width: 60px;
            height: 100%;
            background-color: pink;
            text-decoration: line-through;
        }
        
        .box .sj {
            position: absolute;
            left: 60px;
            width: 0;
            height: 0;
            border-color: transparent pink transparent transparent;
            border-style: solid;
            border-width: 20px 20px 0 0;
        }
    </style>
</head>

<body>
    <div class="box">
        <!-- 可以在left里面放个i,专门做三角形 -->
        <div class="sj"></div>
        <!-- 下面这两个模块可以用span呐 -->
        <div class="left">¥1650</div>
        <div class="right">¥5650</div>

    </div>
</body>

</html>

京东秒杀模块——css三角形妙用

上一篇:thinkphp6集成gatewayWorker(workerman)实现实时监听


下一篇:基于Kubernetes部署Jenkins动态构建环境