195400 发表于 2021-8-27 20:07

红枫 发表于 2021-8-27 18:35
您的代码更简洁些,谢谢指导!

第二幅图片似乎还是不灵。

195400 发表于 2021-8-27 20:09

寒冬残荷 发表于 2021-8-27 19:34
JS对退休前没有接触过网页知识的我这个老年人来说是望而生畏!你们年轻人或退休前接触过网页知识的老年 ...
好像都是老年人,雄鹰版主是不是不知道。退休前要奔生活,不是相关专业的不会感兴趣,是相关专业的不会只有这等混论坛的水平,所以这里的网友大概率是退休后的老年人。

寒冬残荷 发表于 2021-8-27 20:53

195400 发表于 2021-8-27 20:09
好像都是老年人,雄鹰版主是不是不知道。退休前要奔生活,不是相关专业的不会感兴趣,是相关专业的不会只 ...

你们学习能力强!{:1_293:}我智商太低了:lol。一看js那些命令感觉很深奥看不懂,不像html和css,一个标签一个属性的,没有变量,没有赋值……:lol

寒冬残荷 发表于 2021-8-27 20:55

怪了,为什么我都不能直接在这里发有图片的代码,贴上代码,系统就把我的图片地址去掉。而你们都可以呢?是我的浏览器问题,还是我在论坛的级别不够?

寒冬残荷 发表于 2021-8-27 20:56


<DIV style="POSITION: relative; WIDTH: 800px; HEIGHT:850px;TOP: 00px; LEFT: 0px">

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#apDiv1 {position:absolute; width:1000px; height:450px; z-index:1; left: 50px; top: 140px;}
#apDiv2 {position:absolute; width:60px; height:25px; z-index:1; left: 52px; top: 710px;}
#apDiv3 {position:absolute; width:60px; height:25px; z-index:1; left: 163px; top: 710px;}
#apDiv4 {position:absolute; width:60px; height:25px; z-index:1; left: 274px; top: 710px;}
#apDiv5 {position:absolute; width:60px; height:25px; z-index:1; left: 385px; top: 710px;}
#apDiv6 {position:absolute; width:60px; height:25px; z-index:1; left: 496px; top: 710px;}
#apDiv7 {position:absolute; width:60px; height:25px; z-index:2; left: 607px; top: 710px;}
#apDiv8 {position:absolute; width:60px; height:25px; z-index:2; left: 718px; top: 710px;}
#apDiv9 {position:absolute; width:60px; height:25px; z-index:3; left: 829px; top: 710px;}
#apDiv10 {position:absolute; width:60px; height:25px; z-index:3; left: 940px; top: 710px;}
</style>
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p=new Image; d.MM_p.src=a;}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames.document; n=n.substring(0,p);}
if(!(x=d)&&d.all) x=d.all; for (i=0;!x&&i<d.forms.length;i++) x=d.forms;
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr=x; if(!x.oSrc) x.oSrc=x.src; x.src=a;}
}
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
var obj = null; with (document){ if (getElementById)
obj = getElementById(objId); }
if (obj){
if (theValue == true || theValue == false)
eval("obj.style."+theProp+"="+theValue);
else eval("obj.style."+theProp+"='"+theValue+"'");
}
}
</script>
</head>
<body onload="MM_preloadImages('c/010.jpg','c/08.jpg','c/07.jpg','c/06.jpg'c/05.jpg','c/04.jpg','c/03.jpg','c/02.jpg','c/01.jpg')">

<div style="position : relative;left: 0px; top: 0px; width:1650px; height:820px; overflow : hidden;">
<img src="https://z3.ax1x.com/2021/08/27/hMNsYj.png" style="width:1650px; height:850px; ">
</div>

<div id="apDiv1" onmousedown="MM_changeProp('apDiv1','','top','width=400 height=175','DIV')">
<img src="https://z3.ax1x.com/2021/08/27/hMUM3n.jpg" name="huan1" width="1000" height="550" id="huan1" onmousemove="MM_changeProp('huan1','','width','400','IMG');MM_changeProp('huan1','','height','150','IMG')" onmouseout="MM_changeProp('huan1','','width','1000','IMG');MM_changeProp('huan1','','height','550','IMG')" />
</div>

<div id="apDiv2">
<img src="https://z3.ax1x.com/2021/08/27/hMd26I.jpg" name="d01" width="100" height="45" id="d01" onmouseover="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMUtN4.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<div id="apDiv3">
<img src="https://z3.ax1x.com/2021/08/27/hMdfnP.jpg" alt="" name="d02" width="100" height="45" id="d02" onmouseover="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMUDu6.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<div id="apDiv4">
<img src="https://z3.ax1x.com/2021/08/27/hMdRXt.jpg" alt="" name="d03" width="100" height="45" id="d03" onmouseover="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMU0jx.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<div id="apDiv5">
<img src="https://z3.ax1x.com/2021/08/27/hMdcpd.jpg" alt="" name="d04" width="100" height="45" id="d04" onmousemove="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMUwg1.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<div id="apDiv6">
<img src="https://z3.ax1x.com/2021/08/27/hMdh0f.jpg" alt="" name="d04" width="100" height="45" id="d05" onmousemove="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMUd3R.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<div id="apDiv7">
<img src="https://z3.ax1x.com/2021/08/27/hMd478.jpg" alt="" name="d04" width="100" height="45" id="d06" onmousemove="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMUYEF.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<div id="apDiv8">
<img src="https://z3.ax1x.com/2021/08/27/hMdIAS.jpg" alt="" name="d04" width="100" height="45" id="d07" onmousemove="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMUGHU.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<div id="apDiv9">
<img src="https://z3.ax1x.com/2021/08/27/hMdotg.jpg" alt="" name="d04" width="100" height="45" id="d08" onmousemove="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMUN4J.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<div id="apDiv10">
<img src="https://z3.ax1x.com/2021/08/27/hMdg1A.jpg" alt="" name="d04" width="100" height="45" id="d09" onmousemove="MM_swapImage('huan1','','https://z3.ax1x.com/2021/08/27/hMUaC9.jpg',1)" onmouseout="MM_swapImgRestore()" />
</div>
<!--
<audio src="http://music.163.com/song/media/outer/url?id=105863.mp3" loop="loop"autoplay="autoplay" type="audio/mp3" ></audio>
-->
</body>
</html>
</DIV>
<BR><BR><BR><BR><BR>

寒冬残荷 发表于 2021-8-27 20:58

得了!用我的代码不行,是我的代码有问题?做成网页文件又可以?

195400 发表于 2021-8-27 20:58

寒冬残荷 发表于 2021-8-27 20:53
你们学习能力强!我智商太低了。一看js那些命令感觉很深奥看不懂,不像html和css,一个标签 ...

找个css变量的例子给你看看:lol

https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom_properties

寒冬残荷 发表于 2021-8-27 21:00

红枫的代码,我js部分看不懂。:lol

寒冬残荷 发表于 2021-8-27 21:07

195400 发表于 2021-8-27 20:58
找个css变量的例子给你看看

https://developer.mozilla.org/zh-CN/docs/Web/CSS/Using_CSS_custom ...
我只玩玩而已,不学那么高级的!:lol不过我是真的不知道css还可以自定义变量。

宇神无敌 发表于 2021-8-27 21:07

欣赏老师精美音画佳作,赞一个!:victory:
页: 1 [2] 3
查看完整版本: 代码音画:《中国山水画》----鼠标滑过放大图片