网站悬浮广告图片代码怎么增加个关闭按钮
导读:本文共370字符,通常情况下阅读需要1分钟。同时您也可以点击右侧朗读,来听本文内容。按键盘←(左) →(右) 方向键可以翻页。
摘要:广告图作为背景,给div,然后在div内放个img图片当做关闭按钮。varcount;functionmove(){$('apDiv').style.top=document.documentElement.scrollTop+parseInt(count);}functiongetCount(){count=$('apDiv').currentStyle.top;... ...
目录
(为您整理了一些要点),点击可以直达。广告图作为背景,给div,然后在div内放个img图片当做关闭按钮。varcount;functionmove(){$('apDiv').style.top=document.documentElement.scrollTop+parseInt(count);}functiongetCount(){count=$('apDiv').currentStyle.top;}functionclose0(){$('apDiv').style.display='none';}window.onscroll=move;window.onload=function(){getCount();}<!--img是关闭按钮的图片--><divid="apDiv"style="right:30px;position:fixed;width:118px;height:272px;z-index:2;background-image:url(image/adv.jpg);float:left;top:110px;"><imgsrc="image/button.jpg"onClick="close0();"/></div>图片路径还有宽高位置之类的你自己改改就可以了
网站悬浮广告图片代码怎么增加个关闭按钮的详细内容,希望对您有所帮助,信息来源于网络。