zoukankan      html  css  js  c++  java
  • html5 导航栏切换效果

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>学堂授课</title>
        <meta name="viewport"
              content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
        <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    
        <link rel="stylesheet" href="../../../res/css/common/weui.min.css">
        <link rel="stylesheet" href="../../../res/css/common/jquery-weui.min.css">
        <link rel="stylesheet" href="../../../res/css/common/style.css">
        <link rel="stylesheet" href="../../../res/css/common/hm.css">
        <link rel="stylesheet" href="main.css">
    </head>
    
    <body>
    
    <header class="tl-header">
        <div class="header">
            <h1>我的素材</h1>
            <a href="#" class="tl-return" onclick="back();">
                <img src="../../../res/image/back.png" class="tl-img-left"/>
            </a>
        </div>
        <ul class="tabs" style="background: #F8F8F8;overflow: hidden">
            <li class="col-3" data-toggle="unread" ><span class="current tl-999">全部</span></li>
            <li class="col-3" data-toggle="read" ><span class="tl-999">待审核</span></li>
            <li class="col-3" data-toggle="read" ><span class="tl-999">已通过</span></li>
            <li class="col-3" data-toggle="read" ><span class="tl-999">未通过</span></li>
        </ul>
    </header>
    
    <div style="padding: 16% 6% 4% 6%;background: #fff;">
    
    
    </div>
    
    
    
    <script src="../../../res/js/jquery-2.1.4.js"></script>
    <script src="../../../res/js/jquery-weui.js"></script>
    <script src="../../../res/js/common.js"></script>
    <!--<script src="articleList.js"></script>-->
    <script>
    
        $(function() {
            // 切换卡(消息、我的订单)
            jQuery(".tabs li").bind("click", function() {
                jQuery(".tabs .current").removeClass('current');
                jQuery(".swiper-container .db").removeClass("db").addClass("dn");
                jQuery(this).find("span").addClass("current");
                var data_toggle = jQuery(this).attr("data-toggle");
                jQuery("#" + data_toggle).addClass("db");
            });
        })
    </script>
    
    </body>
    </html>

    核心css

    
    
    ul,li{list-style: none;}

    .tl-header .current{color:#008EE5;border-bottom: 3px solid #008EE5;height:50px;line-height: 50px;display: inline-block;padding:0 10px;} .tl-header li .col-4 span{font-size: 875rem} .col-3 {25%;position: relative; min-height: 1px;float:left;text-align: center;}
  • 相关阅读:
    【BZOJ3190】[JLOI2013]赛车 单调栈+几何
    【BZOJ2738】矩阵乘法 整体二分
    PR 批量导入
    JAVA 水果机游戏及编码
    sap 图标查看
    ABAP 给动态变量赋值
    abap 数字移动小游戏
    FI模块与SD、MM的接口配置方法
    信用控制增强
    SAP-财务知识点
  • 原文地址:https://www.cnblogs.com/zxyun/p/9438696.html
Copyright © 2011-2022 走看看