淘宝图片切换代码990(网页图片切换代码)
admin 发布:2022-12-19 09:28 163
本篇文章给大家谈谈淘宝图片切换代码990,以及网页图片切换代码对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
本文目录一览:
淘宝做了一张990热切图,怎么放到首页
先把图片上传到空间,再复制链接到dreamweaver里弄热切再复制body里的代码到首页你是需要装修的地方就行拉
高分悬赏支持淘宝网页特效的图片切换效果代码
P /P
P align=center /P
TABLE id=table8 borderColor=#bdb76b cellSpacing=0 cellPadding=0 width=533 align=center border=3
TBODY
TR
TD
SCRIPT language=JavaScript
!--
var bannerAD=new Array();
var bannerADlink=new Array();
var adNum=0;
bannerAD[0]="图片地址";
bannerAD[1]="图片地址";
bannerAD[2]="图片地址";
bannerAD[3]="图片地址";
bannerAD[4]="图片地址";
bannerAD[5]="图片地址";
bannerAD[6]="图片地址";
bannerAD[7]="";preloadedimages=new Array();
for (i=1;ibannerAD.length;i++){
preloadedimages[i]=new Image();
preloadedimages[i].src=bannerAD[i];
}
function setTransition(){
if (document.all){
bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
bannerADrotator.filters.revealTrans.apply();
}
}
function playTransition(){
if (document.all)
bannerADrotator.filters.revealTrans.play()
}
function nextAd(){
if(adNumbannerAD.length-1)adNum++ ;
else adNum=0;
setTransition();
document.images.bannerADrotator.src=bannerAD[adNum];
playTransition();
theTimer=setTimeout("nextAd()", 5000);
}
function displayStatusMsg() {
status=bannerADlink[adNum];
document.returnValue = true;
}
//--
/SCRIPT
P align=centerIMG style="FILTER: revealTrans(duration=2,transition=20)" height=400 src="" width=533 border=0 name=bannerADrotator/P
SCRIPT language=JavaScriptnextAd()/SCRIPT
/TD/TR/TBODY/TABLE
P /P
P /P
淘宝,天猫的1920店招 想切下正中间990宽度的图片,怎么精准的切下来
(1920-990)÷2=465像素
首先裁剪设置宽度465像素,高度不变,分别在图片两边进行裁剪,不要真的裁剪,两边各拖出辅助线,这样中间那块就是990居中的图片了。不会发我我给你裁。
如图:
求简单的图片切换代码
第一种:
把如下代码加入body区域中
body onclick=Clicked()
SCRIPT
!--
transeffect = 0;
theeffects = new Array(24);
theeffects[0] = “盒状收缩“;
theeffects[1] = “盒状向外“;
theeffects[2] = “圆形收缩“;
theeffects[3] = “圆形向内“;
theeffects[4] = “从下向上“;
theeffects[5] = “从上向下“;
theeffects[6] = “从左向右“;
theeffects[7] = “从右向左“;
theeffects[8] = “百页窗形向右“;
theeffects[9] = “百页窗形向下“;
theeffects[10] = “棋盘形交叉向右“;
theeffects[11] = “棋盘形交叉向下“;
theeffects[12] = “随意溶解形“;
theeffects[13] = “左右向内“;
theeffects[14] = “左右向外“;
theeffects[15] = “上下向内“;
theeffects[16] = “上下向外“;
theeffects[17] = “条纹状向左下“;
theeffects[18] = “条纹状向左上“;
theeffects[19] = “条纹状向右下“;
theeffects[20] = “条纹状向右上“;
theeffects[21] = “溶解水平状“;
theeffects[22] = “溶解上下状“;
theeffects[23] = “随着溶解“;
current_image = “image1“;
function Clicked() {
var the_image, the_other;
text2.style.visiblity=“hidden“;
if (image1.style.visibility==“inherit“) {
the_image = image2;
the_other = image1;
}
else {
the_image = image1;
the_other = image2;
}
the_other.style.visibility=“hidden“;
the_image.filters.item(0).Apply();
the_image.filters.item(0).Transition = transeffect;
the_image.filters.item(0).Play(2.0);
the_image.style.visibility=“inherit“;
text2.innerText=theeffects[transeffect];
transeffect++;
if (transeffect == 24)
transeffect = 0;
text2.style.visibility=“visible“;
}
//--
/SCRIPT
DIV id=image
DIV id=text1/DIVIMG id=image1
src=“Upfiles/200422684962.gif“
style=“FILTER: revealTrans(Duration=3.0,Transition=1); VISIBILITY: hidden“ IMG id=image2 src=“Upfiles/200422684962.gif“
style=“FILTER: revealTrans(Duration=3.0,Transition=1); VISIBILITY: hidden“ /DIV
DIV id=text2/DIV
第二步:把body中的内容改为:
body bgcolor=“#fef4d9“ onclick=Clicked()
over feboy
第二种:
第一步、把下面这段代码插入到页面的head与/head之间:
script language=javascript
isns = navigator.appName == "Netscape";
function ztstr(id,picurl,linkurl)
{
this.id=id
this.picurl=picurl
this.linkurl=linkurl
}
zhuanti=new Array()
imgcount=1;
frequency=10*1000;//30秒
//在这里修改图片的路径和链接
zhuanti[1]=new ztstr('1','','')
zhuanti[2]=new ztstr('2','','')
zhuanti[3]=new ztstr('3','','')
zhuanti[4]=new ztstr('4','','')
imgcount=zhuanti.length-1
for(i=1;i=imgcount;i++)
{
eval_r("img"+i+"=new Image()")
eval_r("img"+i+".src=zhuanti["+i+"].picurl")
}
nn=1
var rand1 = 0;
var useRand = 0;
function swapPic() {
var imgnum = zhuanti.length - 1;
do {
var randnum = Math.random();
rand1 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand1 == useRand);
useRand = rand1;
// alert(useRand);
nn=useRand;
change_img();
}
function change_img()
{
eval_r('document.pic.src=img'+nn+'.src');
nn++;
if(nnimgcount) nn=1
if(!isns)
{
pic.filters.item(0).apply()
pic.style.visibility='visible'
pic.filters.item(0).play()
setTimeout("pic.style.visibility='hidden'",frequency);
}
else
document.pic.visibility='visible'
tt=setTimeout('change_img()',frequency)
}
function pictarget()
{
tt=nn-1
if(tt1) tt=imgcount
cururl=zhuanti[tt].linkurl
window.open(cururl);
}
function ini()
{
if(!isns)
{
spacewidth=Math.round((divmask.offsetWidth-770)/2)
dmwidth=770+spacewidth
dmheight=divmask.offsetHeight
totalstep=50
timeout=50
dmstepw=Math.round(770/totalstep)
dmsteph=Math.round(dmheight/totalstep)
setTimeout('hidimg()',3000)
}
else swapPic()
}
function hidimg()
{
dmwidth-=dmstepw
dmheight-=dmsteph
eval_r('divmask.style.clip="rect(0,'+dmwidth+','+dmheight+',0)"')
hdrun=setTimeout('hidimg()',timeout)
if(dmwidth=spacewidthdmheight=0)
{
divmask.style.visibility='hidden'
clearTimeout(hdrun)
swapPic()
}
}
/script
第二步、调用定义好的javascript函数,在body里加上以下代码:
body onload=swapPic()
第三步、在页面中插入图片和链接:
a href=javascript :void(null) onclick='javascript :pictarget();return false;'img src="" width=468 height=60 border=0 name=pic style="visibility:hidden;filter:revealtrans(duration=2.0,transition=12)"/a
好,到这里就大功告成了。另外,试试改变transition的数值,可以得到不同的转换效果哟~~
淘宝图片切换代码990的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于网页图片切换代码、淘宝图片切换代码990的信息别忘了在本站进行查找喔。
版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;
相关推荐
- 05-02淘宝右侧导航条css代码(淘宝右侧导航条css代码)[20240502更新]
- 05-02cs游戏代码(cs进入游戏代码)[20240502更新]
- 05-02vb代码注册控件(vb 注册表)[20240502更新]
- 05-02popup弹出层代码(popupwindow底部弹出)[20240502更新]
- 05-02css3代码大全(html5代码大全)[20240502更新]
- 05-02网页源代码翻译器(html网页源码翻译工具)[20240502更新]
- 05-02图片走马灯效果代码(html图片走马灯效果)[20240502更新]
- 05-02html代码蝴蝶(动态蝴蝶的代码)[20240502更新]
- 05-02轮番图代码(图片轮播图代码)[20240502更新]
- 05-02关于人事管理系统代码的信息[20240502更新]
取消回复欢迎 你 发表评论:
- 标签列表
- 最近发表
- 友情链接