zoukankan      html  css  js  c++  java
  • 导航布局

        <link href="css/daohang.css" rel="stylesheet" />
        <script src="js/daohang.js"></script>
        <link href="css/page1.css" rel="stylesheet" />
    </head>
    <body>
        <form id="form1" runat="server">
            <div id="top">
                <div id="top_left"></div>
                <div id="top_right">
                    <a href="Default.aspx"><div class="item" id="item1"  style="background-color: red;"></div></a>
                    <a href="Default2.aspx"><div class="item"></div></a>
                    <a href="Default3.aspx"><div class="item"></div></a>
                    <a href="Default4.aspx"><div class="item"></div></a>
                    <div class="item"></div>
                    <div class="item"></div>
                </div>
            </div>

    JS写外面:鼠标移入移出变色。

    window.onload = function () {
    
        var items = document.getElementsByClassName("item");
        for (var i = 0; i < items.length; i++) {
            items[i].onmouseover = function () {
                if (this.style.backgroundColor != "red")
                    this.style.backgroundColor = "yellow";
            };
    
            items[i].onmouseout = function () {
                if (this.style.backgroundColor != "red")
                    this.style.backgroundColor = "navy";
            };
    
        }
    };

    #bigimg {
    position: relative;
    80%;
    left: 10%;
    height: 500px;
    background-color: green;
    min-800px;
    box-shadow:25px 15px 25px black;  大图出现阴影

     min- 1000px;/*限定宽度在某一范围;*/

    .item {
    position: relative;
    120px;
    height: 80px;
    background-color: navy;
    float: left;
    margin-left: 10px;

    -moz-border-radius: 2500px;   由正方形 变成 圆形,变成椭圆只需改变宽度
    -webkit-border-radius: 2500px;
    border-radius: 2500px;


    }

  • 相关阅读:
    ADC测试matlab代码
    matlab的滤波器仿真——低通滤波器与插值滤波器
    PDF转Image最终方案
    多线程和蕃茄炒蛋
    git学习总结
    踩坑了,当前目录问题
    Angular 1.x 升级到 Angular 2
    打造AngularJs2.0开发环境
    发布一个自用的ansi转utf8程序
    用itextsharp打印pdf示例
  • 原文地址:https://www.cnblogs.com/yp11/p/5966276.html
Copyright © 2011-2022 走看看