css布局实现手机端移动端优惠券列表页面代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现手机端移动端优惠券列表页面代码

代码标签: 手机 移动 优惠券 列表 页面

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>优惠券</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <style>
        * {
            margin: 0;
            padding: 0;
            border: 0;
            list-style: none;
            text-decoration: none;
            color: inherit;
            font-weight: normal;
            font-family: "微软雅黑";
            box-sizing: border-box;
            font-style: normal;
            outline: none;
            -webkit-tap-highlight-color: transparent;
        }
        body {
            width: 100%;
            overflow-x: hidden;
            background: #f5f5f5;
        }
        img {
            vertical-align: middle;
            max-width: 100%;
        }
        .top-bar {
            width: 100%;
            height: .88rem;
            line-height: .88rem;
            font-size: .36rem;
            color: #ffffff;
            background: #fc3f3f;
            text-align: center;
            padding: 0 .2rem;
            position: relative;
        }
        .top-bar a {
            display: inline-block;
            width: .5rem;
            height: .88rem;
            background: url(//repo.bfw.wiki/bfwrepo/icon/5ff8f2c747054.png) left center no-repeat;
            background-size: .37rem;
            position: absolute;
            left: .2rem;
            top: 0;
            z-index: 1;
        }
        /* 类别 */
        .cate {
            width: 100%;
            height: 1rem;
            padding: 0 .4rem;
            font-size: .32rem;
            color: #666666;
            background: #ffffff;
        }
        .cate ul {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            height: 1rem;
        }
        .cate ul li {
            width: 100%;
            text-align: center;
            position: relative;
            height: 1rem;
            line-height: 1rem;
        }
        .cate ul li.active {
            color: #fc403f;
            font-weight: bold;
        }
        .cate ul li.active::after {
            content: "";
            display: inline-block;
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: .3rem;
            height: .06rem;
            background: #fc3f3f;
        }
        /* 内容列表区 */
        .content {
            display: none;
        }
        .content.active {
            display: block;
            width: 100%;
            height: auto;
            overflow: hidden;
        }
        .content ul {
            display: flex;
            flex-direction: column;
            width: 100%;
            padding: .25rem .07rem;
        }
        .content ul li {
            width: 100%;
            height: 2.58rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: url(//repo.bfw.wiki/bfwrepo/image/610a1bb687730.png) center center no-repeat;
            background-size: 100% 100%;
            padding: 0 .65rem 0 .6rem;
        }
        .content ul li .l {
            display: flex;
            flex-direction: column;
        }
        .content ul li .l .top {
            display: flex;
            line-height: 1.1rem;
        }
        .content ul li .l .top .price {
            display: flex;
            align-items: baseline;
        }
        .content ul li .l .top .price span {
            font-size: 1.14rem;
            color: #fffefe;
            font-weight: bold;
            text-shadow: .05rem .1rem 0 rgba(205,43,42,1);
        }
        .content ul li .l .top .price i {
            font-size: .4rem;
            color: #fffefe;
            padding-left: .2rem;
            padding-right: .2rem;
        }
        .content ul li .l .top .tag {
            font-size: .26rem;
            color: #fc403f;
            flex-shrink: 0;
            width: 1.73rem;
            height: .48rem;
            line-height: .48rem;
            text-align: center;
            background: url(//repo.bfw.wiki/bfwrepo/image/610a1c71e798c.png) center center no-repeat;
            background-size: 100% 100%;
            margin-top: .6rem;
        }
        .content ul li .l .bottom {
            font-size: .24rem;
            color: #fffefe;
            letter-spacing: .02rem;
        }
        .content ul li .r {
            flex-shrink: 0;
            width: 1.1rem;
            height: 1.1rem;
            line-height: 1.1rem;
            text-align: center;
            background: url(//repo.bfw.wiki/bfwrepo/image/610a1bd32677f.png) center center no-repeat;
            background-size: 100% 100%;
            font-size: .38rem;
            color: #ffffff;
            font-weight: bold;
            letter-spacing: .02rem;
        }
        .content ul li .r.gray {
            filter: grayscale(90%);
        }
    </style>

    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/flexible.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1.js"></script>

</head>

<body>
    <div id="app">
        <div class="top-bar">
            <a class="back" href="javascript:;"></.........完整代码请登录后点击上方下载按钮下载查看

网友评论0