我做的图片(javascript)飘动为什么会在移到有flash的地方,就看不见,等移出这个flash又从底下出来了? 因为flash显示级别高。做法是:将flash做成背景透明的!方法是:找到你加入flash的那个object 加入这句话:<param name=wmode value=transparent> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 因为FLASH控件的"级别"比图片的级别高,所以无法覆盖FLASH,你可以把飘动的也改成FLASH,这样就可以从它上面过去了. 还可以把img放进一个iframe中,或者用object。<OBJECT id=img style="display:none;z-index:1000; position:absolute; top:0; left:0; width:152; height: 200;" type="text/x-scriptlet" data="about:<div style='position:absolute;left:0;top:0;width:152;height:200;font:14;color:white;background:black;border:1 solid black'>sfgsdfg</div>"></OBJECT> 你要的源代码……看注释。<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=Movie1 WIDTH=400 HEIGHT=300> <PARAM NAME=movie VALUE="http://ad4.sina.com.cn/zgl/lgpop1.swf"> <PARAM NAME=quality VALUE=high> <EMBED src=http://ad4.sina.com.cn/zgl/lgpop1.swf quality=high WIDTH=400 HEIGHT=300 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED> </OBJECT><OBJECT id=img style="z-index:1000; position:absolute; top:0; left:0; width:150; height: 70;" type="text/x-scriptlet" data="about:<img src=http://expert.csdn.net/images/csdn.gif>"></OBJECT><!--修改上边那个img的src总会吧?--><script language=JavaScript><!-- Beginvar xPos = 20;var yPos = document.body.clientHeight;var step = 1;var delay = 30;var height = 0;var Hoffset = 0;var Woffset = 0;var yon = 0;var xon = 0;var pause = true;var interval;img.style.top = yPos;function changePos() {width = document.body.clientWidth;height = document.body.clientHeight;Hoffset = img.offsetHeight;Woffset = img.offsetWidth;img.style.left = xPos + document.body.scrollLeft;img.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() {img.visibility = "visible";interval = setInterval('changePos()', delay);}start();</script> JQUERY的一个问题。 asp.net中怎么将execl表格导入SQL数据库 做了个网站,怎么直接判断是手机浏览,还是计算机浏览呀 js字符校验的问题 请问只用html和JavaScript如何实现自动退出登录功能? 初学,老师们,求求了 我想在文本框<textarea>复制一张图片进去显示,不知道如何实现??? 求大侠们支支招 c:forEach 获取选择数据问题 请教一个问题!如果我想打开一个窗口后,需要传入初始化一些值,应该怎么处理! 如何使含有框架的页面能整个返回另一个页面 怎样祛除有连接的图象的兰色边框?
<OBJECT id=img style="display:none;z-index:1000; position:absolute; top:0; left:0; width:152; height: 200;" type="text/x-scriptlet" data="
about:<div style='position:absolute;left:0;top:0;width:152;height:200;font:14;color:white;background:black;border:1 solid black'>
sfgsdfg</div>
"></OBJECT>
看注释。
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=Movie1 WIDTH=400 HEIGHT=300>
<PARAM NAME=movie VALUE="http://ad4.sina.com.cn/zgl/lgpop1.swf">
<PARAM NAME=quality VALUE=high>
<EMBED src=http://ad4.sina.com.cn/zgl/lgpop1.swf quality=high WIDTH=400 HEIGHT=300 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
<OBJECT id=img style="z-index:1000; position:absolute; top:0; left:0; width:150; height: 70;" type="text/x-scriptlet" data="
about:<img src=http://expert.csdn.net/images/csdn.gif>"></OBJECT>
<!--修改上边那个img的src总会吧?-->
<script language=JavaScript>
<!-- Begin
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.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() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
start();
</script>