CSS 网页两边的悬浮广告 谁有制作代码,最好是,源文件!谢谢!!!!可追加悬赏!!!!
3个回答
展开全部
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>悬浮广告</title>
</head>
<body>
<div style="height:900px; display:block;"></div>
<div id="AdLayer1" style='position: absolute; ;z-index:1; left:100px; border:1px #DDD solid; width:36px; height:200px; background-color:#CCC;'></div>
<div id="AdLayer2" style='position: absolute; ;z-index:1; right:100px; border:1px #DDD solid; width:36px; height:200px; background-color:green;'></div>
<script type="text/javascript">
// 页面初始化
function initEcAd() {
document.all.AdLayer1.style.posTop = 200;
document.all.AdLayer1.style.visibility = 'visible'
document.all.AdLayer2.style.posTop = 200;
document.all.AdLayer2.style.visibility = 'visible'
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
// 移动左面的广告层
function MoveLeftLayer(layerName) {
var x = 100;
var y = 100;// 左侧广告距离页首高度
var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = parseInt(y)");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
// 移动右边的广告层
function MoveRightLayer(layerName) {
var x = 100;
var y = 100;// 右侧广告距离页首高度
var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posRight = x");
setTimeout("MoveRightLayer('AdLayer2');", 20);
}
initEcAd()
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>悬浮广告</title>
</head>
<body>
<div style="height:900px; display:block;"></div>
<div id="AdLayer1" style='position: absolute; ;z-index:1; left:100px; border:1px #DDD solid; width:36px; height:200px; background-color:#CCC;'></div>
<div id="AdLayer2" style='position: absolute; ;z-index:1; right:100px; border:1px #DDD solid; width:36px; height:200px; background-color:green;'></div>
<script type="text/javascript">
// 页面初始化
function initEcAd() {
document.all.AdLayer1.style.posTop = 200;
document.all.AdLayer1.style.visibility = 'visible'
document.all.AdLayer2.style.posTop = 200;
document.all.AdLayer2.style.visibility = 'visible'
MoveLeftLayer('AdLayer1');
MoveRightLayer('AdLayer2');
}
// 移动左面的广告层
function MoveLeftLayer(layerName) {
var x = 100;
var y = 100;// 左侧广告距离页首高度
var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = parseInt(y)");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLeftLayer('AdLayer1');", 20);
}
// 移动右边的广告层
function MoveRightLayer(layerName) {
var x = 100;
var y = 100;// 右侧广告距离页首高度
var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posRight = x");
setTimeout("MoveRightLayer('AdLayer2');", 20);
}
initEcAd()
</script>
</body>
</html>
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-CN" />
<meta content="all" name="robots" />
<title>符合web标准且可单独关闭的多幅对联广告 - 网页特效观止-网页特效代码|JsCode.CN|</title>
</head>
<body>
<SCRIPT language="JavaScript">
//符合web标准且可关闭的多幅对联广告
//Modified By 在远方 www.jscode.cn
<!--
lastScrollY = 0;
function heartBeat(){
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-CN" />
<meta content="all" name="robots" />
<title>符合web标准且可单独关闭的多幅对联广告 - 网页特效观止-网页特效代码|JsCode.CN|</title>
</head>
<body>
<SCRIPT language="JavaScript">
//符合web标准且可关闭的多幅对联广告
//Modified By 在远方 www.jscode.cn
<!--
lastScrollY = 0;
function heartBeat(){
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
tion:fixed;
用固定就行。
如:
HTML
<div class="pos-fix">
<div class="links">联系我</div>
<div class="links">联系我</div>
</div>
CSS:
.pos-fix
.pos-fix .links
你就照这个模式搬进去就行了。
如果还有不明白的话,直接HI吧……
用固定就行。
如:
HTML
<div class="pos-fix">
<div class="links">联系我</div>
<div class="links">联系我</div>
</div>
CSS:
.pos-fix
.pos-fix .links
你就照这个模式搬进去就行了。
如果还有不明白的话,直接HI吧……
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询