jquery实现开关滑动导航效果代码

代码语言:html

所属分类:菜单导航

代码描述:jquery实现开关滑动导航效果代码

代码标签: 滑动 导航 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <style>
        body {
            padding-top: 100px;
        }

        .tab-menu {
            margin-top: 20px;
            height: 26px;
            overflow: hidden;
            position: relative;
            border-radius: 20px
        }
        ul {
            padding: 0;
            margin: 0;
            list-style: none
        }
        li {
            height: 24px;
            line-height: 24px;
            float: left;
            text-align: center;
            position: relative;
            font-size: 12px
        }
        .tab-menu span {
            margin: 4px;
            display: inline-block;
            height: 18px;
            position: absolute;
            left: 0;
            top: 0;
            border-radius: 20px;
            transition: left .4s;
            -webkit-transition: left .4s;
            -moz-transition: left .4s
        }
        li:hover {
            cursor: pointer
        }
        .tworow {
            width: 160px;
            background-color: rgba(224,229,232,1)
        }
        .tworow span {
            width: 72px;
            background-color: rgba(0,54,80,1)
        }
        .tworow .active {
            color: white
        }
        .tworow li {
            width: 80px;
            color: rgba(0,54,80,1)
        }
        .eightrow li {
            width: 50px;
            color: white
        }
        .eightrow .active {
            color: #10aefc
        }
        .eightrow {
            
            background: #10aefc
        }
        .eightrow span {
            width: 42px;
            background: white
        }
    </style>
</head>

<body>
    <center>
        <div class="tab-menu eightrow">
            <span id="bg"></span>
            <ul id="list">
                <li class="active" type="1">24h</li>
                <li type="2">48h</li>
                <li type="3">72h</li>
                &l.........完整代码请登录后点击上方下载按钮下载查看

网友评论0