jquery实现自适应时间线大事记效果代码

代码语言:html

所属分类:布局界面

代码描述:jquery实现自适应时间线大事记效果代码

代码标签: 适应 时间 线 大事记 效果

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

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

<head>

    <meta charset="UTF-8">


    <link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,700" rel="stylesheet">


    <style>
        html, body {
            height: 100%;
           
        }

        body {
            font-family: "Quicksand", sans-serif;
            font-weight: 500;
            color: #424949;
            background-color: #ECF0F1;
            padding: 0 25px;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        h1 {
            text-align: center;
            height: 38px;
            margin: 60px 0;
        }
        h1 span {
            white-space: nowrap;
        }

        .flex-parent {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100%;
        }

        .input-flex-container {
            display: flex;
            justify-content: space-around;
            align-items: center;
            width: 80vw;
            height: 100px;
            max-width: 1000px;
            position: relative;
            z-index: 0;
        }

        .input {
            width: 25px;
            height: 25px;
            background-color: #2C3E50;
            position: relative;
            border-radius: 50%;
        }
        .input:hover {
            cursor: pointer;
        }
        .input::before, .input::after {
            content: "";
            display: block;
            position: absolute;
            z-index: -1;
            top: 50%;
            transform: translateY(-50%);
            background-color: #2C3E50;
            width: 4vw;
            height: 5px;
            max-width: 50px;
        }
        .input::before {
            left: calc(-4vw + 12.5px);
        }
        .input::after {
            right: calc(-4vw + 12.5px);
        }
        .input.active {
            background-color: #2C3E50;
        }
        .input.active::before {
            background-color: #2C3E50;
        }
        .input.active::after {
            background-color: #AEB6BF;
        }
        .input.active span {
            font-weight: 700;
        }
        .input.active span::before {
            font-size: 13px;
        }
        .input.active span::after {
            font-size: 15px;
        }
        .input.active ~ .input, .input.active ~ .input::before, .input.active ~ .input::after {
            background-color: #AEB6BF;
        }
        .input span {
            width: 1px;
            height: 1px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            visibility: hidden;
        }
        .input span::before, .input span::after {
            visibility: visible;
            position: absolute;
            left: 50%;
        }
        .input span::after {
            content: attr(data-year);
            top: 25px;
            transform: translateX(-50%);
            font-size: 14px;
        .........完整代码请登录后点击上方下载按钮下载查看

网友评论0