【急求】JS移动悬浮QQ客服代码,兼容个浏览器!! 需要兼容各个浏览器的,很多不兼容!就是在浏览器窗口中一直随意浮动的那种!!希望大家帮帮忙哦!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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"><head> <title>zell419</title><style type="text/css">#head{position:fixed;_position:absolute;top:0px;_top:0px;_margin-top:expression(this.style.pixelHeight+document.documentElement.scrollTop)}#foot{position:fixed;_position:absolute;bottom:0px;_bottom:0px;_margin-top:expression(this.style.pixelHeight+document.documentElement.scrollTop)}</style></head><body style="height:5000px;"><div id="head">head</div><div id="foot">foot</div></body></html>自己再调整下吧 。 <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>www.lanrentuku.com</title></head><body style="height:2000px;"><DIV id=img1 style="Z-INDEX: 100; LEFT: 2px; WIDTH: 59px; POSITION: absolute; TOP: 43px; HEIGHT: 61px; visibility: visible;"><a href="http://bbs.csdn.net/" target="_blank"><img src="http://avatar.profile.csdn.net/0/8/9/2_zell419.jpg" width="80" height="80" border="0"></a></DIV><div align="center"> <p> <SCRIPT language="javascript"> var xPos = 300;var yPos = 200; var step = 1;var delay = 20; var height = 0;var Hoffset = 0;var Woffset = 0;var yon = 0;var xon = 0;var pause = true;var interval;img1.style.top = yPos;function changePos() { width = document.body.clientWidth; height = document.body.clientHeight; Hoffset = img1.offsetHeight; Woffset = img1.offsetWidth; img1.style.left = xPos + document.body.scrollLeft; img1.style.top = yPos + document.body.scrollTop; if (yon) {yPos = yPos + step;} else {yPos = yPos - step;} if (yPos < 0) {yon = 1;yPos = 0;} if (yPos >= (height - Hoffset)) {yon = 0;yPos = (height - Hoffset);} if (xon) {xPos = xPos + step;} else {xPos = xPos - step;} if (xPos < 0) {xon = 1;xPos = 0;} if (xPos >= (width - Woffset)) {xon = 0;xPos = (width - Woffset); } } function start() { img1.visibility = "visible"; interval = setInterval('changePos()', delay); } function pause_resume() { if(pause) { clearInterval(interval); pause = false;} else { interval = setInterval('changePos()',delay); pause = true; } } start(); </SCRIPT> </p></div></body></html>ie6 ff chrome 可行 。 谢谢你了!再帮我,但上面的代码,ff,chrome都不行吧?不动啊,只有Ie6是可以的。 http://www.mayixueyuan.com/newshow.php?id=163这个不错啊,推荐!! 求助:insertAdjacentHTML提示"用于此操作的原始HTML无效" 输出select option问题 时间控件问题,哪个大侠帮我下 一个从模态窗口打开另一个模态窗口时的返回值的问题。 div屏蔽页面,实现透明效果,怎么做 有什么办法可以让客户端从浏览的网页中提取数据到本地数据库?重酬! 关于CSDN技术频道文档中心在线编辑工具 怎么让一个text,当它获得输入焦点时弹出一个类似下拉列表的东西,可以选择不同的值? 下载JS的问题! js正則表達式問題 问个jquery 替换的问题。 不知道我选对了没有,至少现在选对了
<!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">
<head>
<title>zell419</title>
<style type="text/css">
#head{position:fixed;_position:absolute;top:0px;_top:0px;_margin-top:expression(this.style.pixelHeight+document.documentElement.scrollTop)}
#foot{position:fixed;_position:absolute;bottom:0px;_bottom:0px;_margin-top:expression(this.style.pixelHeight+document.documentElement.scrollTop)}
</style>
</head>
<body style="height:5000px;">
<div id="head">
head
</div>
<div id="foot">
foot
</div>
</body>
</html>自己再调整下吧 。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>www.lanrentuku.com</title>
</head><body style="height:2000px;">
<DIV id=img1 style="Z-INDEX: 100; LEFT: 2px; WIDTH: 59px; POSITION: absolute; TOP: 43px; HEIGHT: 61px;
visibility: visible;"><a href="http://bbs.csdn.net/" target="_blank"><img src="http://avatar.profile.csdn.net/0/8/9/2_zell419.jpg" width="80" height="80" border="0"></a></DIV>
<div align="center">
<p>
<SCRIPT language="javascript">
var xPos = 300;
var yPos = 200;
var step = 1;
var delay = 20;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img1.style.top = yPos;
function changePos()
{
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img1.offsetHeight;
Woffset = img1.offsetWidth;
img1.style.left = xPos + document.body.scrollLeft;
img1.style.top = yPos + document.body.scrollTop;
if (yon)
{yPos = yPos + step;}
else
{yPos = yPos - step;}
if (yPos < 0)
{yon = 1;yPos = 0;}
if (yPos >= (height - Hoffset))
{yon = 0;yPos = (height - Hoffset);}
if (xon)
{xPos = xPos + step;}
else
{xPos = xPos - step;}
if (xPos < 0)
{xon = 1;xPos = 0;}
if (xPos >= (width - Woffset))
{xon = 0;xPos = (width - Woffset); }
}
function start()
{
img1.visibility = "visible";
interval = setInterval('changePos()', delay);
}
function pause_resume()
{
if(pause)
{
clearInterval(interval);
pause = false;}
else
{
interval = setInterval('changePos()',delay);
pause = true;
}
}
start();
</SCRIPT>
</p>
</div>
</body>
</html>ie6 ff chrome 可行 。