asp主页里图片展示怎样让图片自动切换
答案:2 悬赏:20 手机版
解决时间 2021-03-08 10:02
- 提问者网友:临风不自傲
- 2021-03-07 20:28
详细步骤
最佳答案
- 五星知识达人网友:第幾種人
- 2021-03-07 20:42
加一段代码时去就可以了,只要把里面的图片换成你自己的就OK,如果这都不明白,加我Q我来跟你搞定@!图片轮显示代码(把里面的图片地址换成你的图片地址就可以了):<script>
var i=0,pictures=new Array();
var picbase="images/fengcai/";//设置图片数组,图片数为奇数
pictures[i++]="images/fengcai/1.gif"
pictures[i++]="images/fengcai/2.gif"
pictures[i++]="images/fengcai/3.gif"
pictures[i++]="images/fengcai/4.gif"
pictures[i++]="images/fengcai/5.gif"
var picturewidth=10//图片宽度
var pictureheight=10//图片高度
var delay=10//延迟时间
if (document.all) {
document.write(' document.write('+picturewidth+';height:'+pictureheight+'"')
document.write('CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">')
document.write('')
m = DAControl_Wipe.MeterLibrary;
whatTransformation = new ActiveXObject("DXImageTransform.Microsoft.Wipe");
whatTransformation.GradientSize = 1.0;//设置渐变度
whatTransformation.WipeStyle = 0;//设置擦洗类型
var myArr=new Array(),myArr2=new Array();
var len=Math.floor(pictures.length/2);//将图片分成两组
for(var i=0;i
myArr[i]=m.ImportImage(pictures[2*i])
myArr2[i]=m.ImportImage(pictures[2*i+1])
}
myArr[i]=m.ImportImage(pictures[2*i])
myArr=m.Array(myArr)
myArr2=m.Array(myArr2)
Index = m.Interpolate(0.5,len+0.5,len*2*delay).RepeatForever();
Index2 = m.Interpolate(0,len,len*2*delay).RepeatForever();
//交错运行半个时间单元
var whatPictures=new Array();
whatPictures[0] = myArr.NthAnim(Index);
whatPictures[1] = myArr2.NthAnim(Index2);
forward = m.Interpolate(0, 1, delay);
back = m.Interpolate(1, 0, delay);
whatMovement = m.Sequence(forward, back).RepeatForever();
//设置参数方向
theResult = m.ApplyDXTransform( whatTransformation, whatPictures, whatMovement );
DAControl_Wipe.Image = theResult.OutputBvr;//设置显示图形
DAControl_Wipe.Start();//开始
}
</script>
var i=0,pictures=new Array();
var picbase="images/fengcai/";//设置图片数组,图片数为奇数
pictures[i++]="images/fengcai/1.gif"
pictures[i++]="images/fengcai/2.gif"
pictures[i++]="images/fengcai/3.gif"
pictures[i++]="images/fengcai/4.gif"
pictures[i++]="images/fengcai/5.gif"
var picturewidth=10//图片宽度
var pictureheight=10//图片高度
var delay=10//延迟时间
if (document.all) {
document.write(' document.write('+picturewidth+';height:'+pictureheight+'"')
document.write('CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">')
document.write('')
m = DAControl_Wipe.MeterLibrary;
whatTransformation = new ActiveXObject("DXImageTransform.Microsoft.Wipe");
whatTransformation.GradientSize = 1.0;//设置渐变度
whatTransformation.WipeStyle = 0;//设置擦洗类型
var myArr=new Array(),myArr2=new Array();
var len=Math.floor(pictures.length/2);//将图片分成两组
for(var i=0;i
myArr2[i]=m.ImportImage(pictures[2*i+1])
}
myArr[i]=m.ImportImage(pictures[2*i])
myArr=m.Array(myArr)
myArr2=m.Array(myArr2)
Index = m.Interpolate(0.5,len+0.5,len*2*delay).RepeatForever();
Index2 = m.Interpolate(0,len,len*2*delay).RepeatForever();
//交错运行半个时间单元
var whatPictures=new Array();
whatPictures[0] = myArr.NthAnim(Index);
whatPictures[1] = myArr2.NthAnim(Index2);
forward = m.Interpolate(0, 1, delay);
back = m.Interpolate(1, 0, delay);
whatMovement = m.Sequence(forward, back).RepeatForever();
//设置参数方向
theResult = m.ApplyDXTransform( whatTransformation, whatPictures, whatMovement );
DAControl_Wipe.Image = theResult.OutputBvr;//设置显示图形
DAControl_Wipe.Start();//开始
}
</script>
全部回答
- 1楼网友:迟山
- 2021-03-07 21:37
加一段代码时去就可以了,只要把里面的图片换成你自己的就ok,如果这都不明白,加我q我来跟你搞定@!图片轮显示代码(把里面的图片地址换成你的图片地址就可以了):<script>
var i=0,pictures=new array();
var picbase="images/fengcai/";//设置图片数组,图片数为奇数
pictures[i++]="images/fengcai/1.gif"
pictures[i++]="images/fengcai/2.gif"
pictures[i++]="images/fengcai/3.gif"
pictures[i++]="images/fengcai/4.gif"
pictures[i++]="images/fengcai/5.gif"
var picturewidth=10//图片宽度
var pictureheight=10//图片高度
var delay=10//延迟时间
if (document.all) {
document.write('')
m = dacontrol_wipe.meterlibrary;
whattransformation = new activexobject("dximagetransform.microsoft.wipe");
whattransformation.gradientsize = 1.0;//设置渐变度
whattransformation.wipestyle = 0;//设置擦洗类型
var myarr=new array(),myarr2=new array();
var len=math.floor(pictures.length/2);//将图片分成两组
for(var i=0;i
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯