zoukankan      html  css  js  c++  java
  • dom 侧栏分享

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>无标题文档</title>
    <style>
    #div1{ 
        height:200px;
        100px;
        background:red;
        position:absolute;
        left:-100px;
        top:100px;
        }
    #div2{
        height:60px;
        30px;
        background:#000;
        position:absolute;
        right:-30px;
        top:70px;
        color:#FFF;
        text-align:center;
        line-height:30px;
        }    
    </style>
    <script type="text/javascript">
    window.onload = function ()
    {
        var odiv = document.getElementById('div1');
        odiv.onmouseover = function ()
        {
            odiv.style.left = '0px';
        };
        
        odiv.onmouseout = function ()
        {
            odiv.style.left = '-100px';
        }
    };
    </script>
    </head>
    
    <body>
    <div id="div1">
        <div id="div2">分享</div>
    </div>
    </body>
    </html>
  • 相关阅读:
    prayer OJ M
    51nod1295
    纪念第一次ak。。。
    noip2007-4
    51nod1344
    51nod1079
    51nod1537
    51nod1269Devu and Flowers
    python基本数据类型之列表list
    Python基本数据类型
  • 原文地址:https://www.cnblogs.com/mayufo/p/4218863.html
Copyright © 2011-2022 走看看