js带关闭的漂浮广告代码

2024-12-14 19:34:09
推荐回答(2个)
回答1:





完全css 如果要动态就是用js+css

回答2:

var count;
function move() {
$('apDiv').style.top=document.documentElement.scrollTop+parseInt(count);
}
function getCount() {
count=$('apDiv').currentStyle.top;
}
function close0() {
$('apDiv').style.display='none';
}
window.onscroll=move;
window.onload=function(){getCount();}

float:left; top: 110px;">