css实现立体式堆叠选项卡效果代码

代码语言:html

所属分类:选项卡

代码描述:css实现立体式堆叠选项卡效果代码

代码标签: 堆叠 选项 效果

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

<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        * {
            box-sizing: border-box;
        }

        ul {
            list-style-type: none;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Lato';
            background: #1a1a1a;
            min-height: 100vh;
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
        }

        .tabs {
            position: relative;
            min-height: 100vh;
            overflow: hidden;
        }
        .tabs__item {
            will-change: transform, opacity, box-shadow;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            margin-bottom: 50px;
            z-index: 1;
            padding: 0 50px;
            color: white;
            box-shadow: 0 30px 60px transparent;
            -webkit-transform-origin: center 5%;
            -ms-transform-origin: center 5%;
            transform-origin: center 5%;
            overflow: hidden;
            -webkit-transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
            transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
        }
        .tabs__item h2 {
            margin-top: 24px;
            font-size: 16px;
            line-height: 1;
        }
        .tabs__item h2 span {
            display: block;
            font-size: 36px;
        }
        .tabs__num {
            text-align: center;
            font-size: 200px;
            font-weight: 700;
            margin: 0;
        }
        .tabs__stats {
            text-align: center;
            font-size: 14px;
            margin: 25px 0 0;
            font-weight: 700;
        }

        .views-toggle {
            position: absolute;
            top: 25px;
            right: 50px;
            width: 40px;
            height: 40px;
            z-index: 10;
            cursor: pointer;
            -webkit-transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
            transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
            -webkit-transition-duration: .3s;
            transition-duration: .3s;
            visibility: visible;
            opacity: 0.6;
        }
        .views-toggle--hidden {
            opacity: 0;
            visibility: hidden;
            z-index: 0;
        }
        .views-toggle:hover {
            opacity: 1;
        }

        .color1 {
            background: #5271C2;
        }
        .color1 .tabs__num {
            text-shadow: 1px 1px rgba(52, 78, 147, 0.7) , 2px 2px rgba(52, 78, 147, 0.703) , 3px 3px rgba(53, 79, 148, 0.706) , 4px 4px rgba(53, 79, 149, 0.709) , 5px 5px rgba(54, 80, 150, 0.712) , 6px 6px rgba(54, 81, 151, 0.715) , 7px 7px rgba(55, 81, 151, 0.718) , 8px 8px rgba(55, 82, 152, 0.721) , 9px 9px rgba(56, 82, 153, 0.724) , 10px 10px rgba(56, 83, 154, 0.727) , 11px 11px rgba(57, 83, 155, 0.73) , 12px 12px rgba(57, 84, .........完整代码请登录后点击上方下载按钮下载查看

网友评论0