鼠标放置图标弹出二维码

html:

 <a href="javascript:void(0)" onMouseOut="hideImg()" onmouseover="showImg()">........</a>

怎么设置图标呢:

 <a href="javascript:void(0)" onMouseOut="hideImg()" onmouseover="showImg()"><img src="xxxxxx.svg"></a>

JS:

<script type="text/javascript"> 
function showImg(){ 
document.getElementById("wxImg").style.display='block'; 
} 
function hideImg(){ 
document.getElementById("wxImg").style.display='none'; 
} 
</script>  	

html:

<div id="wxImg" style="display:none;height:50px;back-ground:#f00;position:absolute;"><img src="微信二维码"></div>
</div>

©️李联华的博客网 当前IP地址:3.22.81.151,归属地:俄亥俄州Dublin ,欢迎您的访问!

温馨提示 : 非特殊注明,否则均为李联华的博客原创文章,本站文章未经授权禁止任何形式转载
文章链接:https://www.ooize.com/place-the-mouse-icon-to-pop-up-the-qr-code.html
订阅
提醒
guest
0 评论
内联反馈
查看所有评论
Loading...