css布局实现行业卡片悬浮列表效果代码

代码语言:html

所属分类:悬停

代码描述:css布局实现行业卡片悬浮列表效果代码

代码标签: 行业 卡片 悬浮 列表 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <style>
        /* 公共样式表css */
        html,body {
            color: #333;
            margin: 0;
            height: 100%;
        }

        * {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        }

        a {
            text-decoration: none;
            color: #000;
        }

        img {
            border: 0;
        }

        body {
            background: #F4F5F9;
            color: #666;
            font-family: 'Microsoft Yahei', 'PingFangSC', sans-serif;
        }

        html, body, div, dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6, p, blockquote, pre, button, fieldset, form, input, legend, textarea, th, td {
            margin: 0;
            padding: 0;
        }

        a {
            text-decoration: none;
            color: #08acee;
        }

        button {
            outline: 0;
        }

        img {
            border: 0;
        }

        button,input,optgroup,select,textarea {
            margin: 0;
            font: inherit;
            color: inherit;
            outline: none;
        }

        li {
            list-style: none;
        }

        a {
            color: #666;
        }

        a:hover {
            color: #eee;
        }

        .clearfix::after {
            clear: both;
            content: ".";
            display: block;
            height: 0;
            visibility: hidden;
        }

        .clearfix {}

        /* 必要布局样式css */
        .trade-content {
            padding: 30px 0;
        }

        .trade-title {
            font-size: 24px;
            color: #333;
            text-align: center;
            margin: 50px 0;
            position: relative;
        }

        .trade-title:before {
            content: "";
            position: absolute;
            width: 0;
            height: 0;
            bottom: -19px;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid;
            border-color: #20B09F transparent transparent;
        }

        .trade-title:after {
            content: "";
            position: absolute;
            width: 52px;
            height: 3px;
            background-color: #20B09F;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
        }

        .trade-black {
            height: 400px;
            background-color: #30383e;
        }

        .trade-box {
            width: 1200px !important;
            margin: 0 auto;
            position: relative;
            transition: all .3s ease;
        }

        .trade-box-list {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
        }

        .trade-box-item {
            flex: 1;
            text-align: center;
            position: relative;
            height: 400px;
            background: no-repeat center;
            background-size: 100% auto;
        }

        .trade-content .trade-box-item:before {
            content: "";
            position: absolute;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
            background-color: rgba(0,0,0,.6);
            transition: all .4s cubic-bezier(.4, 0, .2, 1);
        }

        .trade-box-item a {
            position: absolute;
            width: 100%;
            height: 100%;
            left: 0;
            top: 0;
        }

        a, button, input, textarea {
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            -moz-transition: all .3s ease;
            -w.........完整代码请登录后点击上方下载按钮下载查看

网友评论0