css实现pc端全屏tab多标签卡片图文效果代码

代码语言:html

所属分类:布局界面

代码描述:css实现pc端全屏tab多标签卡片图文效果代码

代码标签: 全屏 tab 标签 卡片 图文 效果

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

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <style>
@charset "utf-8";

        * {
            padding: 0;
            margin: 0;
            font-family: "微软雅黑";
            box-sizing: border-box;
            outline: none;
            color: inherit;
            font-size: inherit;
            font-weight: normal
        }
:after,:before {
            box-sizing: inherit
        }
        a {
            text-decoration: none;
            color: inherit
        }
        ul {
            list-style: none
        }
        .overflow-hide {
            overflow: hidden
        }
        .col-sm-3 {
            width: 25%;
            float: left;
            position: relative
        }
        .pavilion-container {
            padding-bottom: 50px;
            background: url(//repo.bfw.wiki/bfwrepo/image/606bc8f0452bb.png);
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            min-height: 720px
        }
        .layer-title {
            padding: 50px 0 30px;
            text-align: center;
            font-size: 30px;
            color: #fff;
            letter-spacing: 1.09px
        }
        /*tab分类*/
        .pavilion-container .pavilion-inner {
            max-width: 1200px;
            margin: 0 auto
        }
        .pavilion-container .pavilion-inner .tabs {
            padding: 0 10px
        }
        .pavilion-container .pavilion-inner .tabs li {
            float: left;
            padding: 0 21px;
            border: 1px solid #c9a467;
            border-radius: 2px;
            line-height: 36px;
            font-size: 16px;
            color: #c9a467;
            letter-spacing: .35px
        }
        .pavilion-container .pavilion-inner .tabs li {
            margin-left: 21.2667px;
            cursor: pointer
        }
        .pavilion-container .pavilion-inner .tabs li:first-child {
            margin-left: 0
        }
        .pavilion-container .pavilion-inner .tabs li.on {
            background: #c9a467;
            color: #1c1f36
        }
        .pavilion-container .pavilion-inner .tabs li .hot-icon {
            width: 18px;
            height: 24px;
            background: url(//repo.bfw.wiki/bfwrepo/image/60e1adff96ce8.png);
            margin-right: 10px;
            background-repeat: no-repeat
        }
        .pavilion-container .pavilion-inner .tabs li.on .hot-icon {
            background: url(//repo.bfw.wiki/bfwrepo/image/60e1adff96ce8.png)
        }
        .pavilion-container .pavilion-inner .tabs li>span {
            display: inline-block;
            vertical-align: middle
        }
        /*tab内容*/
        .pavilion-container .tab-content-wrap {
            position: relative;
            margin-top: 20px;
            height: 420px
        }
        .pavilion-container .tab-content {
            position: absolute;
            top: 65px;
            transition: all .5s linear;
            opacity: 0;
            z-index: -1;
            height: 0;
            width: 100%
        }
        .pavilion-container .tab-content.show {
            height: auto;
            opacity: 1;
            top: 0;
            z-index: 1
        }
        .pavilion-container .tab-content .col-sm-3 {
            padding: 0 10px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card {
            position: relative;
            padding: 20px;
            background: #fff;
            border-radius: 2px;
            overflow: hidden;
            cursor: pointer;
            transition: .2s linear
        }
        /*大卡片*/
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-lg {
            position: relative;
            height: 420px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card:before {
            position: absolute;
            content: '';
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            border-radius: 1px 1px 0 0
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-lg img {
            height: 90px;
            width: auto;
            display: block
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-lg h3 {
            margin-top: 30px;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card p {
            margin-top: 5px;
            font-size: 12px;
            color: #a0a2a8;
            letter-spacing: .51px;
            line-height: 20px;
            height: 20px;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-lg .labels {
            margin-top: 10px;
            margin-right: 10px;
            padding-bottom: 20px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-lg .labels span {
            display: inline-block;
            margin-top: 10px;
            margin-right: 10px;
            padding: 0 5px;
            background: rgba(160,162,168,.1);
            border: 1px solid rgba(102,106,117,.1);
            border-radius: 2px;
            line-height: 20px;
            color: #a0a2a8;
            font-size: 12px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card-lg .time {
            border-top: 1px solid #e7e7e7
        }
        /*中卡片*/
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-md+.tab-card-md {
            margin-top: 20px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-md {
            height: 200px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-md img {
            height: 65px;
            width: auto;
            display: block
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-md h3 {
            margin-top: 15px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card .time {
            position: absolute;
            bottom: 10px;
            width: calc(100% - 40px);
            padding-top: 17px;
            font-size: 12px;
            color: #666a75;
            letter-spacing: .44px;
            line-height: 23px;
            text-align: left
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card .time span {
            font-size: 20px;
            color: #f66f6a;
            letter-spacing: 0;
            line-height: 23px;
            margin-right: 3px
        }
        /*小卡片*/
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-sm {
            height: 90px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-sm+.tab-card-sm {
            margin-top: 20px
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card.tab-card-sm .time {
            border-top-width: 0
        }
        .pavilion-container .tab-content .col-sm-3 .tab-card:hover {
            background: #efedd4
        }
        /*查看全部*/
        .pavilion-container .view-go {
            margin-top: 35px;
            font-size: 18px;
            color: #fff;
            text-align: center
        }
        .pavilion-container .view-go a span.arrow-more {
            display: inline-block;
            vertical-align: middle
        }
        .pavilion-container .view-go a span.arrow-f {
            width: 13px;
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0