zoukankan      html  css  js  c++  java
  • 导航条样式代码

    参考博文:这里写链接内容

    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Bootstrap 101 Template</title>
    
        <link href="css/bootstrap.min.css" rel="stylesheet">
    
        <style>
    
            a{
                text-decoration: none;
                cursor: pointer;
            }
            nav{
                position: fixed;
                top: 0;
                left: 0;
                z-index: 9000;
                width: 100%;
                height: 50px;
                background-color: #ddd;
            }
            nav>div{
                color: #9e9e9e;
                background-color: #ffffff;
                width: 218px;
                left: 0;
                position: absolute;
                top: 0;
                height: 50px;
                cursor: pointer;
            }
            nav>div div{
                position:absolute;
                height: 50px;
                pointer-events: none;
                width: 100%;
                padding-left: 20px;
                box-sizing: border-box;
                transform: translateZ(25px);
            }
            nav>div div:last-child{
                background-color: #000000;
                color: #ffffff;
                transform: rotateX(90deg) translateZ(25px);
            }
            nav>div div h1{
                font-family: "TrumpGothicEastBold", Arial, Helvetica, sans-serif;
                font-size: 16px;
                line-height: 30px;
                text-transform: uppercase;
                letter-spacing: 1px;
            }
    
            nav>div div span{
                display: block;
                width: 16px;
                height: 3px;
                margin-left: -1px;
                margin-top: 4px;
                background-color: #c7c7c7;
            }
            nav>div div:last-child span{
                background-color: #e74c4c;
            }
            nav>div a{
                color:#9e9e9e;
                position: absolute;
                height: 50px;
                width: 100%;
                box-sizing: border-box;
                transition:transform .2s;
                transform-style: preserve-3d;
            }
            nav>div:hover a{
                transform: rotateX(-90deg);
            }
        </style>
    
    </head>
    <body>
    
    
    <nav>
        <div>
            <a href="tool.html">
                <div>
                    <h1>TOOL</h1>
                    <span></span>
                </div>
                <div>
                    <h1>TOOL</h1>
                    <span></span>
                </div>
            </a>
        </div>
        <div>
            <a href="work.html">
                <div>
                    <h1>WORK</h1>
                    <span></span>
                </div>
                <div>
                    <h1>WORK</h1>
                    <span></span>
                </div>
            </a>
        </div>
        <div>
            <a href="360.html">
                <div>
                    <h1>VR/360</h1>
                    <span></span>
                </div>
                <div>
                    <h1>VR/360</h1>
                    <span></span>
                </div>
            </a>
        </div>
        <div>
            <a href="directors.html">
                <div>
                    <h1>DIRECTORS</h1>
                    <span></span>
                </div>
                <div>
                    <h1>DIRECTORS</h1>
                    <span></span>
                </div>
            </a>
        </div>
        <div>
            <a href="awards.html">
                <div>
                    <h1>AWARDS</h1>
                    <span></span>
                </div>
                <div>
                    <h1>AWARDS</h1>
                    <span></span>
                </div>
            </a>
        </div>
        <div>
            <a href="about.html">
                <div>
                    <h1>ABOUT</h1>
                    <span></span>
                </div>
                <div>
                    <h1>ABOUT</h1>
                    <span></span>
                </div>
            </a>
        </div>
        <div>
            <a href="contact.html">
                <div>
                    <h1>CONTACT</h1>
                    <span></span>
                </div>
                <div>
                    <h1>CONTACT</h1>
                    <span></span>
                </div>
            </a>
        </div>
    </nav>
    
    
    
    
    
    
    <script src="js/jquery-1.8.2.js"></script>
    <script src="js/bootstrap.min.js"></script>
    
    <script type="text/javascript">
        $("nav>div").css("left", function (i) {
                    return i * 220;
                }
        );
        $("nav>div").click(function () {
            var href = $(this).children().eq(0).attr("href");
            $(window).attr("location", href);
        });
    </script>
    </body>
    </html>
  • 相关阅读:
    SpringBoot2.x入门教程:引入jdbc模块与JdbcTemplate简单使用
    2.5万字长文简单总结SpringMVC请求参数接收
    SpringBoot2.x入门:使用CommandLineRunner钩子接口
    百万级别数据Excel导出优化
    SpringBoot2.x入门:应用打包与启动
    谈谈对分布式事务的一点理解和解决方案
    3W字干货深入分析基于Micrometer和Prometheus实现度量和监控的方案
    SpringBoot2.x入门教程:理解配置文件
    SpringBoot2.x入门:引入web模块
    SpringBoot2.x入门:快速创建一个SpringBoot应用
  • 原文地址:https://www.cnblogs.com/zhong-fucheng/p/7202905.html
Copyright © 2011-2022 走看看