美文网首页
前端6班-裘曾渊 右下角广告

前端6班-裘曾渊 右下角广告

作者: 饥人谷_裘曾渊 | 来源:发表于2015-11-22 16:53 被阅读0次

重点

  • 广告定位

position:fixed ; right:0; bottom:0 
  • 广告事件处理

    $("clickMe").onmouseover= function(){//鼠标移入事件
            $("showPic").className = "show";
            $('closeBtn').style.display = 'block';
        }
        
    $("closeBtn").onclick= function(){//鼠标点击事件
          $("closeBtn").className = "hide";
          $("showPic").className = "hide";
    }
  • 函数封装

var $ = function(id){
    return document.getElementById(id);   
   }

相关文章

网友评论

      本文标题:前端6班-裘曾渊 右下角广告

      本文链接:https://www.haomeiwen.com/subject/xkcrhttx.html