首页 > 其他 > 详细

鼠标经过放大二维码

时间:2018-11-30 21:05:41      阅读:175      评论:0      收藏:0      [点我收藏+]
<style>
.nodeSmall {
width: 50px;
height: 50px;
background: url(../img/bgs.png) no-repeat -159px -51px;
position: fixed;
right: 10px;
top: 40%;
}
.erweima {
position: absolute;
top: 0;
left: -150px;
}
.nodeSmall a {
display: block;
width: 50px;
height: 50px;
}
.hide {
display: none;
}

.show {
display: block;
}
</style>

</head>
<body>
<div class="nodeSmall" id="node_small">
<a href="#"></a><!--锚定-->
<div class="erweima hide" id="er">
<img src="../img/456.png" />
</div>
</div>
<script>
function lss(id) {
return document.getElementById(id);
}
var aObj=lss("node_small").getElementsByTagName("a")[0];
//为a注册鼠标进入
aObj.onmouseenter=function () {
lss("er").className="erweima show";
};
//为a注册鼠标离开
aObj.onmouseout=function () {
lss("er").className="erweima hide";
};
</script>

鼠标经过放大二维码

原文:https://www.cnblogs.com/lujieting/p/10046467.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!