银牌会员
性别保密
威望 点
注册时间2010-2-21
最后登录1970-1-1
在线时间 小时
好友
UID17188
听众
阅读权限100
- 积分
- 2606
鲜花( 40) 鸡蛋( 0)
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?注册
x
波浪式图片展现:三峡情例
代码如下分割线下
*******************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HEAD><TITLE>-SHERRY音画-</TITLE>
<META http-equiv=Content-Style-Type content=text/css>
<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<STYLE type=text/css>.time {
BEHAVIOR: url(#default#time2)
}
BODY {
BORDER-RIGHT: #5C3317 1px ridge; BORDER-TOP: #5C3317 1px ridge; MARGIN: 0px;
OVERFLOW: hidden; BORDER-LEFT: #5C3317 1px ridge; BORDER-BOTTOM: #5C3317 1px ridge
}
#layer1 {
SCROLLBAR-ARROW-COLOR: #5C3317 ; SCROLLBAR-BASE-COLOR: black
}
</STYLE>
<style type="text/css">
* {margin:0;padding:0;}
body {margin:0px auto;background:#000000;}
img {margin:0;border:0;padding:0;}
#jsF {position:relative;margin:0;width:1000px;height:482px;overflow:hidden;}
#jsF ul {position:absolute;top:0;left:-2;list-style-type:none;z-index:2;}
#jsF li {display:block;position:absolute;top:0;margin:0;padding:0;overflow:hidden;}
</style>
</head>
<body>
<div id="jsF"></div>
<div id="debug"></div>
<script>
//<[CDATA[
var jsF = document.getElementById('jsF');
var speed1 = 200, speed2 = 6000;
var iA = 0, iB = 0, iC = 0;
var bD = [];
var aImg = ['http://blog.newssc.org/UploadFiles/2010-4/271029905157.jpg','http://blog.newssc.org/UploadFiles/2010-4/271029256579.jpg','http://blog.newssc.org/UploadFiles/2010-4/271030430547.jpg','http://blog.newssc.org/UploadFiles/2010-4/271030367376.jpg','http://blog.newssc.org/UploadFiles/2010-4/271031559087.jpg','http://blog.newssc.org/UploadFiles/2010-4/271033451160.jpg' ];
var aLink = ['','','','','','',''];
var iImgWidth = 1000, iImgHeight = 482;
var iDivWidth = iImgWidth/10;
jsF.style.width = iImgWidth + 'px';
jsF.style.height = iImgHeight + 'px';
var oImg = [];
oImg[0] = new Image();
oImg[0].src = aImg[0];
oImg[1] = new Image();
oImg[1].src = aImg[1];
window.onload = function() {
jsF_create();
}
//
function jsF_create() {
if (aImg[iA+2] && !bD[iA+2]){
oImg[iA+2] = new Image();
oImg[iA+2].src = aImg[iA+2];
}
if (!bD[iA]) {
var oUl = document.createElement('ul');
/*oUl.style.position = 'absolute';
oUl.style.top = '0';
oUl.style.left = '0';*/
oUl.style.width = iImgWidth + 'px';
oUl.style.height = iImgHeight + 'px';
var oUlLi = document.createElement('li');
oUlLi.style.right = '0';
oUlLi.style.width = iDivWidth +'px';
oUlLi.style.height = iImgHeight + 'px';
var oLiA = document.createElement('a');
oLiA.href = aLink[iA];
var oLiImg = document.createElement('img');
oLiImg.src = oImg[iA].src;
oLiImg.style.marginLeft = -6*iDivWidth + 'px';
oLiA.appendChild(oLiImg);
oUlLi.appendChild(oLiA);
oUl.appendChild(oUlLi);
for (var i=0; i<10; i++) {
oUlLi = document.createElement('li');
oUlLi.style.right = i*iDivWidth + 'px';
oUlLi.style.width = 1.5*iDivWidth +'px';
oUlLi.style.height = iImgHeight + 'px';
//oUlLi.style.background = color[i];
oLiA = document.createElement('a');
oLiA.href = aLink[iA];
oLiImg = document.createElement('img');
oLiImg.src = oImg[iA].src;
oLiImg.style.marginLeft = -6*iDivWidth + 'px';
oLiA.appendChild(oLiImg);
oUlLi.appendChild(oLiA);
//oUlLi.appendChild(document.createTextNode(i));
oUl.appendChild(oUlLi);
}
jsF.appendChild(oUl);
bD[iA] = !bD[iA];
}
jsF_show();
//document.getElementById('debug').innerText = jsF.innerHTML;
}
//
function jsF_show(){
var oUl = jsF.getElementsByTagName('ul');
var oLi = oUl[iA].getElementsByTagName('li');
var oImgs = oUl[iA].getElementsByTagName('img');
oUl[iA].style.zIndex = ++iC;
for (var i=1; i<11; i++){
oImgs[i].style.marginLeft = -6*iDivWidth + 'px';
oImgs[i].style.visibility = 'hidden';
}
jsF_move();
}
//
function jsF_move(){
var oUl = jsF.getElementsByTagName('ul');
var oLi = oUl[iA].getElementsByTagName('li');
var oImgs = oUl[iA].getElementsByTagName('img');
if (iB++<10)
oImgs[iB].style.visibility = 'visible';
for (var i=1; i<oImgs.length; i++) {
var iBgpx = parseInt(oImgs[i].style.marginLeft);
if (iBgpx<(i+0.5)*iDivWidth-iImgWidth) {
var iMovePx = Math.floor((iImgWidth-(i+0.5)*iDivWidth+iBgpx)/15);
oImgs[i].style.marginLeft = iBgpx - iMovePx + 'px';
} else {
oImgs[i].style.marginLeft = ((i+0.5)*iDivWidth-iImgWidth) + 'px';
}
}
//document.getElementById('debug').innerText = jsF.innerHTML;
if (parseInt(oImgs[10].style.marginLeft)<0.5*iDivWidth) {
setTimeout('jsF_move()',speed1);
} else {
iB = 0;
//document.getElementById('debug').innerText = oUl[iA].style.display;
iA = ++iA==aImg.length ? 0 : iA;
if (bD[iA]) {
setTimeout('jsF_show()',speed2);
} else {
setTimeout('jsF_create()',speed2);
}
}
}
//]]>
</script>
<OBJECT id=aboutplayer height=0 width=0
classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6 ?><PARAM
NAME="AutoStart" VALUE="-1"><PARAM NAME="Balance" VALUE="-1"><PARAM
NAME="enabled" VALUE="-1"><PARAM NAME="EnableContextMenu" VALUE="-
1"><PARAM NAME="url"
VALUE="http://tg.6621.cn/201004/sherry1224/c611049ff6ce0f7e.wma"><PARAM
NAME="PlayCount" VALUE="1"><PARAM NAME="rate" VALUE="1"><PARAM
NAME="currentPosition" VALUE="-1"><PARAM NAME="currentMarker"
VALUE="-1"><PARAM NAME="defaultFrame" VALUE="-1"><PARAM
NAME="invokeURLs" VALUE="0"><PARAM NAME="baseURL" VALUE=""><PARAM
NAME="stretchToFit" VALUE="-1"><PARAM NAME="volume"
VALUE="100"><PARAM NAME="mute" VALUE="0"><PARAM NAME="uiMode"
VALUE="mini"><PARAM NAME="windowlessVideo" VALUE="0"><PARAM
NAME="fullScreen" VALUE="0"><PARAM NAME="enableErrorDialogs"
VALUE="-1"><PARAM NAME="SAMIStyle" VALUE=""><PARAM NAME="SAMILang"
VALUE=""><PARAM NAME="SAMIFilename"
VALUE="">
</body>
</html>
**********************
注明:自己只需要换图片就行 |
|