码迷,mamicode.com
首页 > 其他好文 > 详细

图片轮显效果大全

时间:2014-10-02 16:46:03      阅读:381      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   color   io   os   ar   java   

综合各种效果的图片轮显

bubuko.com,布布扣<SCRIPT language="VBScript">
bubuko.com,布布扣Dim FileList,FileListArr,TxtList,TxtListArr
bubuko.com,布布扣FileList 
= "http://et.21cn.com/portray/images/if/01.jpg,http://et.21cn.com/portray/images/if/02.jpg,http://et.21cn.com/portray/images/if/03.jpg"
bubuko.com,布布扣TxtList 
= "<a href=http://www.licns.com/ target=_blank>在这里加入你的连接1</a>,<a href=http://www.licns.com/ target=_blank>在这里加入你的连接2</a>,<a href=http://www.licns.com/ target=_blank>在这里加入你的连接3</a>"
bubuko.com,布布扣FileListArr 
= Split(FileList,",")
bubuko.com,布布扣TxtListArr 
= Split(TxtList,",")
bubuko.com,布布扣Dim CanPlay
bubuko.com,布布扣CanPlay 
= CInt(Split(Split(navigator.appVersion,";")(1)," ")(2))>5
bubuko.com,布布扣Dim FilterStr
bubuko.com,布布扣FilterStr 
= "RevealTrans(duration=2,transition=23)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";BlendTrans(duration=2)"
bubuko.com,布布扣If CanPlay Then
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.Pixelate(,enabled=false,duration=2,maxSquare=25)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.GradientWipe(duration=2,gradientSize=0.25,motion=forward )"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.Stretch(duration=2,stretchStyle=PUSH)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.Wheel(duration=2,spokes=16)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.RandomDissolve(duration=2)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.Spiral(duration=2,gridSizeX=50,gridSizeY=50)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.Slide(duration=2,bands=1,slideStyle=SWAP)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.RadialWipe(duration=2,wipeStyle=CLOCK)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,Duration=1)"
bubuko.com,布布扣FilterStr 
= FilterStr + ";progid:DXImageTransform.Microsoft.Wipe(duration=3,gradientsize=0.25,motion=reverse)"
bubuko.com,布布扣Else
bubuko.com,布布扣Msgbox 
"幻灯片播放具有多种动态图片切换效果,但此功能须要您的浏览器为IE5.5或以上版本号,否则您将仅仅能看到部分的切换效果。",64
bubuko.com,布布扣End If
bubuko.com,布布扣Dim FilterArr
bubuko.com,布布扣FilterArr 
= Split(FilterStr,";")
bubuko.com,布布扣Dim PlayImg_M
bubuko.com,布布扣PlayImg_M 
= 5 * 1000  切换时间(毫秒)
bubuko.com,布布扣Dim I
bubuko.com,布布扣I = 1
bubuko.com,布布扣Sub ChangeImg
bubuko.com,布布扣Do While FileListArr(I)=""
bubuko.com,布布扣I = I + 1
bubuko.com,布布扣If I>UBound(FileListArr) Then I = 0
bubuko.com,布布扣Loop
bubuko.com,布布扣Dim J
bubuko.com,布布扣If I>UBound(FileListArr) Then I = 0
bubuko.com,布布扣Randomize
bubuko.com,布布扣J = Int(Rnd * (UBound(FilterArr)+1))
bubuko.com,布布扣Img.style.filter = FilterArr(J)
bubuko.com,布布扣Img.filters(0).Apply
bubuko.com,布布扣Img.Src = FileListArr(I)
bubuko.com,布布扣Img.filters(0).play
bubuko.com,布布扣Txt.filters(0).Apply
bubuko.com,布布扣Txt.innerHTML = TxtListArr(I)
bubuko.com,布布扣Txt.filters(0).play()
bubuko.com,布布扣I = I + 1
bubuko.com,布布扣If I>UBound(FileListArr) Then I = 0
bubuko.com,布布扣TempImg.Src = FileListArr(I)
bubuko.com,布布扣SetTimeout "ChangeImg", PlayImg_M,"VBScript"
bubuko.com,布布扣End Sub
bubuko.com,布布扣</SCRIPT>
bubuko.com,布布扣<TABLE WIDTH="100%" height="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR ID="NoScript"><TD Align="Center" Style="Color:White">对不起,图片浏览功能需脚本支持,但您的浏览器已经设置了禁止脚本执行。请您在浏览器设置中调整有关安全选项。</TD></TR><TR Style="Display:none" ID="CanRunScript"><TD HEIGHT="100%" Align="Center" vAlign="Center"><Img ID="Img" height="290" width="300" Border="0" ></TD></TR><TR Style="Display:none"><TD><Img ID="TempImg" Border="0"></TD></TR><TR><TD HEIGHT="100%" Align="Center" vAlign="Center"><div ID="Txt" style="PADDING-LEFT: 5px; Z-INDEX: 1; FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1,overlap=0); POSITION:"><a href=http://www.licns.com/ target=_blank>在这里加入你的连接1</a></div></TD></TR></TABLE>
bubuko.com,布布扣<Script Language="VBScript">
bubuko.com,布布扣NoScript.Style.Display = "none"
bubuko.com,布布扣CanRunScript.Style.Display = ""
bubuko.com,布布扣Img.Src = FileListArr(0)
bubuko.com,布布扣SetTimeout "ChangeImg", PlayImg_M,"VBScript"
bubuko.com,布布扣</Script>

 

 

 

腾讯的用Flash调用图片轮显

bubuko.com,布布扣<script type="text/javascript">
bubuko.com,布布扣 
<!--
bubuko.com,布布扣 
bubuko.com,布布扣 
var focus_width=255
bubuko.com,布布扣 
var focus_height=200
bubuko.com,布布扣 
var text_height=18
bubuko.com,布布扣 
var swf_height = focus_height+text_height
bubuko.com,布布扣 
bubuko.com,布布扣 
var pics=http://img1.qq.com/sports/20060102/2958063.jpg|http://img1.qq.com/sports/20060101/2955633.jpg|http://img1.qq.com/sports/20051229/2936827.jpg|http://img1.qq.com/sports/20051227/2920636.jpg
bubuko.com,布布扣 
var links=http://sports.qq.com/a/20060101/000514.htm|http://sports.qq.com/a/20060101/000053.htm|http://sports.qq.com/a/20051229/000159.htm|http://sports.qq.com/a/20051227/000023.htm
bubuko.com,布布扣 
var texts=曲圣卿打进一球两次助攻 阿德莱德大胜|曼城客场被逼平 继海首发多次制造杀机|继海打满全场表现尚可 曼城不敌切尔西|曼城落败 孙继海险助攻
bubuko.com,布布扣 
bubuko.com,布布扣 document.write(
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="+ focus_width +" height="+ swf_height +">);
bubuko.com,布布扣 document.write(
<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="http://sports.qq.com/flash/playswf.swf"><param name=wmode value=transparent><param name="quality" value="high">);
bubuko.com,布布扣 document.write(
<param name="menu" value="false"><param name=wmode value="opaque">);
bubuko.com,布布扣 document.write(
<param name="FlashVars" value="pics=+pics+&links=+links+&texts=+texts+&borderwidth=+focus_width+&borderheight=+focus_height+&textheight=+text_height+">);
bubuko.com,布布扣 document.write(
<embed src="http://sports.qq.com/flash/playswf.swf" wmode="opaque" FlashVars="pics=+pics+&links=+links+&texts=+texts+&borderwidth=+focus_width+&borderheight=+focus_height+&textheight=+text_height+" menu="false" bgcolor="#DADADA" quality="high" width="+ focus_width +" height="+ swf_height +" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />);  document.write(</object>);
bubuko.com,布布扣 
bubuko.com,布布扣 
//-->
bubuko.com,布布扣
 </script>

 最主要的图片轮显

bubuko.com,布布扣<script language=JavaScript>
bubuko.com,布布扣
var imgUrl=new Array();
bubuko.com,布布扣
var imgLink=new Array();
bubuko.com,布布扣
var adNum=0;
bubuko.com,布布扣imgUrl[
1]="http://image2.sina.com.cn/lx/nx/2006/0207/U1275P8T1D227041F918DT20060220173712.jpg"
bubuko.com,布布扣imgLink[
1]="http://eladies.sina.com.cn/bbs/p/2006/0220/17268791.html"
bubuko.com,布布扣imgUrl[
2]="http://image2.sina.com.cn/lx/nx/2006/0128/U1275P8T1D226214F918DT20060128200332.jpg"
bubuko.com,布布扣imgLink[
2]="http://eladies.sina.com.cn/pic/special/198/554.html";
bubuko.com,布布扣imgUrl[
3]="http://image2.sina.com.cn/lx/beauty1/2006/0218/U1275P8T1D229151F916DT20060220180508.jpg"
bubuko.com,布布扣imgLink[
3]="http://blog.sina.com.cn/u/45f2dd64010001yg";
bubuko.com,布布扣imgUrl[
4]="http://image2.sina.com.cn/lx/nx/2006/0210/U1275P8T1D227877F1086DT20060213161341.jpg"
bubuko.com,布布扣imgLink[
4]="http://eladies.sina.com.cn/bbs/2006/0213/16048576.html";
bubuko.com,布布扣     
var imgPre=new Array();
bubuko.com,布布扣   
for (i=1;i<4;i++){
bubuko.com,布布扣imgPre[i]
=new Image();
bubuko.com,布布扣      imgPre[i].src
=imgUrl[i];
bubuko.com,布布扣   }

bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣
function setTransition(){
bubuko.com,布布扣   
if (document.all){
bubuko.com,布布扣      imgUrlrotator.filters.revealTrans.Transition
=Math.floor(Math.random()*20);
bubuko.com,布布扣      imgUrlrotator.filters.revealTrans.apply();
bubuko.com,布布扣   }

bubuko.com,布布扣}

bubuko.com,布布扣
bubuko.com,布布扣
function playTransition(){
bubuko.com,布布扣   
if (document.all)
bubuko.com,布布扣      imgUrlrotator.filters.revealTrans.play()
bubuko.com,布布扣}

bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣
function nextAd(){
bubuko.com,布布扣   
if(adNum<imgUrl.length-1)adNum++ ;
bubuko.com,布布扣      
else adNum=1;
bubuko.com,布布扣   setTransition();
bubuko.com,布布扣   document.images.imgUrlrotator.src
=imgUrl[adNum];
bubuko.com,布布扣   playTransition();
bubuko.com,布布扣   theTimer
=setTimeout("nextAd()"6000);
bubuko.com,布布扣}

bubuko.com,布布扣
bubuko.com,布布扣
function jump2url(){
bubuko.com,布布扣   jumpUrl
=imgLink[adNum];
bubuko.com,布布扣   jumpTarget
=_blank;
bubuko.com,布布扣   
if (jumpUrl != ‘‘){
bubuko.com,布布扣      
if (jumpTarget != ‘‘)window.open(jumpUrl,jumpTarget);
bubuko.com,布布扣      
else location.href=jumpUrl;
bubuko.com,布布扣   }

bubuko.com,布布扣}

bubuko.com,布布扣
function displayStatusMsg() 
bubuko.com,布布扣   status
=imgLink[adNum];
bubuko.com,布布扣   document.returnValue 
= true;
bubuko.com,布布扣}

bubuko.com,布布扣
bubuko.com,布布扣
</script>
bubuko.com,布布扣        
<a onMouseOver="displayStatusMsg();return document.returnValue" 
bubuko.com,布布扣      href
="javascript:jump2url()"><img 
bubuko.com,布布扣      style
="FILTER: revealTrans(duration=2,transition=20);border:1 solid gray;" height=242 
bubuko.com,布布扣      src
="javascript:nextAd()" width=191
bubuko.com,布布扣      name
=imgUrlrotator></a>

 

21cn写真频道图片切换代码

bubuko.com,布布扣<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
bubuko.com,布布扣
<html>
bubuko.com,布布扣
<head>
bubuko.com,布布扣
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
bubuko.com,布布扣
<title>无标题文档</title>
bubuko.com,布布扣
<META http-equiv=Content-Type content="text/html; charset=gb2312">
bubuko.com,布布扣
<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
bubuko.com,布布扣
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
bubuko.com,布布扣
<TABLE width=330 height="250" border=0 cellPadding=0 cellSpacing=0 bgcolor="434343">
bubuko.com,布布扣  
<TBODY>
bubuko.com,布布扣    
<TR> 
bubuko.com,布布扣      
<TD width=330 bgcolor="434343">
 
bubuko.com,布布扣        
<CENTER>

bubuko.com,布布扣          
<DIV id=oTransContainer 
bubuko.com,布布扣      
style
="FILTER: progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0, 
bubuko.com,布布扣                        wipeStyle=0, motion=‘forward‘); WIDTH: 330px; HEIGHT: 250px"
><

bubuko.com,布布扣      
href="?SenFe=List&Id=466298" target=_blank><img src="http://et.21cn.com/portray/images/if/01.jpg" width
=330 
bubuko.com,布布扣      
height=250 border=0 align="absmiddle" id
=oDIV1 
bubuko.com,布布扣      
></a> <

bubuko.com,布布扣      
href="?SenFe=List&Id=399878"
 
bubuko.com,布布扣      target
=_blank><img src="http://et.21cn.com/portray/images/if/02.jpg" width
=330 
bubuko.com,布布扣      
height=250 border=0 align="absmiddle" id
=oDIV2 
bubuko.com,布布扣      
style="DISPLAY: none"></a><
a
bubuko.com,布布扣      
href="?SenFe=List&Id=466294"
 
bubuko.com,布布扣      target
=_blank><img src="http://et.21cn.com/portray/images/if/03.jpg" width
=330 
bubuko.com,布布扣      
height=250 border=0 align="absmiddle" id
=oDIV3 
bubuko.com,布布扣      
style="DISPLAY: none"></a><

bubuko.com,布布扣      
href="?SenFe=List&Id=466296"
 
bubuko.com,布布扣      target
=_blank><img src="http://et.21cn.com/portray/images/if/04.jpg" width
=330 
bubuko.com,布布扣      
height=250 border=0 align="absmiddle" id
=oDIV4
bubuko.com,布布扣      
style="DISPLAY: none"></a></DIV>

bubuko.com,布布扣        
</CENTER>
bubuko.com,布布扣        
<SCRIPT>
bubuko.com,布布扣
var NowFrame = 1;
bubuko.com,布布扣
var MaxFrame = 4
;
bubuko.com,布布扣
var bStart = 0
;
bubuko.com,布布扣
bubuko.com,布布扣
function fnToggle() 
{
bubuko.com,布布扣    
var next = NowFrame + 1
;
bubuko.com,布布扣
bubuko.com,布布扣    
if(next == MaxFrame+1

bubuko.com,布布扣    
{
bubuko.com,布布扣        NowFrame 
=
 MaxFrame;
bubuko.com,布布扣        next 
= 1
;
bubuko.com,布布扣    }

bubuko.com,布布扣
bubuko.com,布布扣    
if(bStart == 0)
bubuko.com,布布扣    
{
bubuko.com,布布扣        bStart 
= 1
;
bubuko.com,布布扣        
bubuko.com,布布扣        setTimeout(
fnToggle()6000
);
bubuko.com,布布扣
bubuko.com,布布扣        
return
;
bubuko.com,布布扣    }

bubuko.com,布布扣    
else
bubuko.com,布布扣    
{
bubuko.com,布布扣        oTransContainer.filters[
0
].Apply();
bubuko.com,布布扣
bubuko.com,布布扣        document.images[
oDIV+next].style.display = ""
;
bubuko.com,布布扣        document.images[
oDIV+NowFrame].style.display = "none"

bubuko.com,布布扣
bubuko.com,布布扣        oTransContainer.filters[
0].Play(duration=2
);
bubuko.com,布布扣
bubuko.com,布布扣        
if(NowFrame ==
 MaxFrame) 
bubuko.com,布布扣            NowFrame 
= 1
;
bubuko.com,布布扣        
else

bubuko.com,布布扣            NowFrame
++;
bubuko.com,布布扣    }
    setTimeout(fnToggle()6000);
bubuko.com,布布扣}

bubuko.com,布布扣
bubuko.com,布布扣fnToggle();
bubuko.com,布布扣
</SCRIPT>
bubuko.com,布布扣      
</TD>
bubuko.com,布布扣    
</TR>
bubuko.com,布布扣  
</TBODY>
bubuko.com,布布扣
</TABLE>
bubuko.com,布布扣
</body>
bubuko.com,布布扣
</html>
加上了鼠标的特效的
bubuko.com,布布扣<script language="JavaScript">
bubuko.com,布布扣
var elady_step=3;    //1:small, 3:middle, 5:big
bubuko.com,布布扣
var elady_speed=50;    //20:fast, 50:middle, 80:slow
bubuko.com,布布扣
var e_tp=new Array();
bubuko.com,布布扣
var e_tplink=new
 Array();
bubuko.com,布布扣
var adNum_elady1=0
;  
bubuko.com,布布扣
var elady_stop_sh=0
;
bubuko.com,布布扣
var elady_star_sh=1
;
bubuko.com,布布扣
bubuko.com,布布扣
function elady1_moveImg()
{
bubuko.com,布布扣
if ((!document.all&&!document.getElementById)||(elady_stop_sh==0))    return
;
bubuko.com,布布扣
if (elady_star_sh==1)
{
bubuko.com,布布扣document.all.elady1_divimg.style.pixelTop
=parseInt(document.all.elady1_divimg.style.pixelTop)+elady_step;}

bubuko.com,布布扣
else if (elady_star_sh==2){
bubuko.com,布布扣document.all.elady1_divimg.style.pixelLeft
=parseInt(document.all.elady1_divimg.style.pixelLeft)+elady_step;}

bubuko.com,布布扣
else if (elady_star_sh==3){
bubuko.com,布布扣document.all.elady1_divimg.style.pixelTop
=parseInt(document.all.elady1_divimg.style.pixelTop)-elady_step;}

bubuko.com,布布扣
else{
bubuko.com,布布扣document.all.elady1_divimg.style.pixelLeft
=parseInt(document.all.elady1_divimg.style.pixelLeft)-elady_step;}

bubuko.com,布布扣
if (elady_star_sh<4)    elady_star_sh++;
bubuko.com,布布扣
else    elady_star_sh=1
;
bubuko.com,布布扣setTimeout(
"elady1_moveImg()",elady_speed);}

bubuko.com,布布扣
bubuko.com,布布扣e_tplink[
0]="http://www.licns.com";
bubuko.com,布布扣e_tp[
0]="http://et.21cn.com/portray/images/if/01.jpg"
;
bubuko.com,布布扣e_tplink[
1]="http://www.licns.com"
;
bubuko.com,布布扣e_tp[
1]="http://et.21cn.com/portray/images/if/02.jpg"
;
bubuko.com,布布扣e_tplink[
2]="http://www.licns.com"
;
bubuko.com,布布扣e_tp[
2]="http://et.21cn.com/portray/images/if/03.jpg"
;
bubuko.com,布布扣e_tplink[
3]="http://www.licns.com"
;
bubuko.com,布布扣e_tp[
3]="http://et.21cn.com/portray/images/if/04.jpg"
;
bubuko.com,布布扣
bubuko.com,布布扣
var currentimage=new
 Array();   
bubuko.com,布布扣
for (i=0;i<=3;i++)
{currentimage[i]=new Image();
bubuko.com,布布扣      currentimage[i].src
=
e_tp[i];
bubuko.com,布布扣         }

bubuko.com,布布扣         
function elady1_set(){   if (document.all)
bubuko.com,布布扣         
{      e_tprotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
bubuko.com,布布扣               e_tprotator.filters.revealTrans.apply();   }

bubuko.com,布布扣               }

bubuko.com,布布扣               
function elady1_playCo()
bubuko.com,布布扣               
{   if (document.all)      e_tprotator.filters.revealTrans.play()
bubuko.com,布布扣               }
function elady1_nextAd(){   if(adNum_elady1<e_tp.length-1)adNum_elady1++ ;
bubuko.com,布布扣                     
else adNum_elady1=0
;
bubuko.com,布布扣                        elady1_set();
bubuko.com,布布扣                           document.images.e_tprotator.src
=
e_tp[adNum_elady1];
bubuko.com,布布扣                              elady1_playCo();
bubuko.com,布布扣                                 theTimer
=setTimeout("elady1_nextAd()"4000);}

bubuko.com,布布扣                                 
function elady1_linkurl(){   jumpUrl=e_tplink[adNum_elady1];
bubuko.com,布布扣                                    jumpTarget
=_blank
;
bubuko.com,布布扣                                       
if (jumpUrl != ‘‘)
{      if (jumpTarget != ‘‘)window.open(jumpUrl,jumpTarget);
bubuko.com,布布扣                                             
else location.href=
jumpUrl;
bubuko.com,布布扣                                                }
}

bubuko.com,布布扣
function elady1_listMsg() 
bubuko.com,布布扣
{   status=e_tplink[adNum_elady1];
bubuko.com,布布扣document.returnValue 
= true;}

bubuko.com,布布扣document.write(
"<div id=‘elady1_divimg‘ style=‘position:relative‘>");
bubuko.com,布布扣document.write(
<a onMouseOver="elady1_listMsg();return document.returnValue" href="javascript:elady1_linkurl()" target="_self">
);
bubuko.com,布布扣document.write(
<img style="FILTER: revealTrans(duration=2,transition=20)" src="javascript:elady1_nextAd()" border=0 name=e_tprotator onMouseover="elady_stop_sh=1;elady1_moveImg()" onMouseout="elady_stop_sh=0" ></a>
);
bubuko.com,布布扣document.write(
"</div>"
);
bubuko.com,布布扣
</script>
图片和文字一起显示的
bubuko.com,布布扣<SCRIPT LANGUAGE=JavaScript>
bubuko.com,布布扣
var imgUrl=new Array();
bubuko.com,布布扣
var imgLink=new Array();
bubuko.com,布布扣
var imgtext=new Array();
bubuko.com,布布扣
var imgsumm=new Array();
bubuko.com,布布扣
var adNum=0;
bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣imgUrl[
1]="http://et.21cn.com/portray/images/if/01.jpg";
bubuko.com,布布扣imgtext[
1]="[组图]第16期 我型我塑 "
bubuko.com,布布扣imgLink[
1]="http://www.licns.com/";
bubuko.com,布布扣imgsumm[
1]="   摩羯座的猫猫是个安静的女孩,面对镜头总是略带羞涩。";
bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣imgUrl[
2]="http://et.21cn.com/portray/images/if/02.jpg";
bubuko.com,布布扣imgtext[
2]="实录:从“三陪女”到“二奶”"
bubuko.com,布布扣imgLink[
2]="http://www.licns.com";
bubuko.com,布布扣imgsumm[
2]="   “二奶”的日子是快乐的,但后遗症却是最深的痛……";
bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣imgUrl[
3]="http://et.21cn.com/portray/images/if/03.jpg";
bubuko.com,布布扣imgtext[
3]="家饰:[组图]我爱抱心肝宝贝"
bubuko.com,布布扣imgLink[
3]="http://www.licns.com/";
bubuko.com,布布扣imgsumm[
3]="   我们已经不再满足于中规中矩,四角形模样的抱枕...";
bubuko.com,布布扣
bubuko.com,布布扣
var imgPre=new Array();
bubuko.com,布布扣
var count=0;
bubuko.com,布布扣
for (i=1;i<=3;i++{
bubuko.com,布布扣
if( (imgUrl!=""&& (imgLink!="") ) {
bubuko.com,布布扣count
++;
bubuko.com,布布扣}
 else {
bubuko.com,布布扣
break;
bubuko.com,布布扣}

bubuko.com,布布扣}

bubuko.com,布布扣
function playTran(){
bubuko.com,布布扣
if (document.all)
bubuko.com,布布扣imgInit.filters.revealTrans.play();
bubuko.com,布布扣}

bubuko.com,布布扣
var key=0;
bubuko.com,布布扣
function nextAd(){
bubuko.com,布布扣
if(adNum<count)adNum++ ;
bubuko.com,布布扣
else adNum=1;
bubuko.com,布布扣
bubuko.com,布布扣
if( key==0 ){
bubuko.com,布布扣key
=1;
bubuko.com,布布扣}
 else if (document.all){
bubuko.com,布布扣imgInit.filters.revealTrans.Transition
=20;
bubuko.com,布布扣imgInit.filters.revealTrans.apply();
bubuko.com,布布扣playTran();
bubuko.com,布布扣
bubuko.com,布布扣}

bubuko.com,布布扣document.images.imgInit.src
=imgUrl[adNum];
bubuko.com,布布扣focustext.innerHTML
=imgtext[adNum];
bubuko.com,布布扣focussumm.innerHTML
=imgsumm[adNum];
bubuko.com,布布扣theTimer
=setTimeout("nextAd()"7000);
bubuko.com,布布扣}

bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣
function goUrl(){
bubuko.com,布布扣window.open(imgLink[adNum],
_blank);
bubuko.com,布布扣}

bubuko.com,布布扣
</SCRIPT> <A TARGET=_self HREF="javascript:goUrl()"><IMG STYLE="FILTER: revealTrans(duration=1,transition=5);border-color:black;color:#000000" SRC="javascript:nextAd()" WIDTH=300 HEIGHT=250 BORDER=0 CLASS=img01 NAME=imgInit></A> 
bubuko.com,布布扣
<A TARGET=_self HREF="javascript:goUrl()"><FONT COLOR=#B41A7A CLASS=sfont><SPAN ID=focustext></SPAN></FONT></A><A TARGET=_self HREF="javascript:goUrl()"><FONT COLOR=#777777 CLASS=sfont><SPAN ID=focussumm></SPAN></FONT></A>

相似于Flash制作的一个图片展示效果

bubuko.com,布布扣<html>
bubuko.com,布布扣
<head>
bubuko.com,布布扣
<title>相似于Flash制作的一个图片展示效果</title>
bubuko.com,布布扣
<meta name="Author" content="http://www.webjx.com">
bubuko.com,布布扣
<meta http-equiv="imagetoolbar" content="no">
bubuko.com,布布扣
<style type="text/css">
bubuko.com,布布扣 body 
{cursor:crosshair;margin:0; padding:0; position:absolute; overflow:hidden; background:#222; left:0; top:0; width:100%; height:100%;zIndex:-2;}
bubuko.com,布布扣
</style>
bubuko.com,布布扣
bubuko.com,布布扣
<script type="text/javascript">
bubuko.com,布布扣
<!--
bubuko.com,布布扣window.onerror 
= new Function("return true");
bubuko.com,布布扣screen.bufferDepth 
= 16;
bubuko.com,布布扣document.onselectstart 
= function () return false; }
bubuko.com,布布扣
bubuko.com,布布扣
////////////////////////////
bubuko.com,布布扣
var NX     = 3;
bubuko.com,布布扣
var NY     = 3;
bubuko.com,布布扣
var SP     = 20;
bubuko.com,布布扣
var DELAY  = 96;
bubuko.com,布布扣
////////////////////////////
bubuko.com,布布扣

bubuko.com,布布扣
var object = new Array();
bubuko.com,布布扣
var nI     = 0;
bubuko.com,布布扣
var run    = false;
bubuko.com,布布扣
var xrun   = 0;
bubuko.com,布布扣
var dR     = 1;
bubuko.com,布布扣
var iW     = 0;
bubuko.com,布布扣
var iH     = 0;
bubuko.com,布布扣
var oH     = 0;
bubuko.com,布布扣
var oW     = 0;
bubuko.com,布布扣
bubuko.com,布布扣
function CObj(N,y,x){
bubuko.com,布布扣
bubuko.com,布布扣 
this.obj = document.createElement("span");
bubuko.com,布布扣 
this.obj.onclick = new Function("object["+N+"].GE1()");
bubuko.com,布布扣 
this.obj.onmousedown = new Function("return false;");
bubuko.com,布布扣 
this.obj.style.cursor = "pointer";
bubuko.com,布布扣 
this.obj.style.position = "absolute";
bubuko.com,布布扣 
this.img = document.createElement("img");
bubuko.com,布布扣 
this.img.style.position = "absolute";
bubuko.com,布布扣 
this.img.src = IMGSRC[N%nI].src;
bubuko.com,布布扣 
this.obj.appendChild(this.img);
bubuko.com,布布扣 IMGBOX.appendChild(
this.obj);
bubuko.com,布布扣
bubuko.com,布布扣 
this.object = new Array();
bubuko.com,布布扣 
this.x      = x;
bubuko.com,布布扣 
this.y      = y;
bubuko.com,布布扣 
this.N      = N;
bubuko.com,布布扣 
this.W      = 0;
bubuko.com,布布扣 
this.H      = 0;
bubuko.com,布布扣 
this.L      = 0;
bubuko.com,布布扣 
this.T      = 0;
bubuko.com,布布扣
bubuko.com,布布扣 
function CImg(Parent,y,x){
bubuko.com,布布扣  
this.Parent = Parent;
bubuko.com,布布扣
bubuko.com,布布扣  
this.obj = document.createElement("span");
bubuko.com,布布扣  
this.obj.style.position="absolute";
bubuko.com,布布扣  
this.obj.style.overflow="hidden";
bubuko.com,布布扣  
this.obj.style.cursor = "pointer";
bubuko.com,布布扣  
this.img = document.createElement("img");
bubuko.com,布布扣  
this.img.style.position = "absolute";
bubuko.com,布布扣  
this.img.src = IMGSRC[N%nI].src;
bubuko.com,布布扣  
this.obj.appendChild(this.img);
bubuko.com,布布扣  
this.Parent.obj.appendChild(this.obj);
bubuko.com,布布扣
bubuko.com,布布扣  
this.N   = Parent.N;
bubuko.com,布布扣  
this.x   = x;
bubuko.com,布布扣  
this.y   = y;
bubuko.com,布布扣  
this.W   = 0;
bubuko.com,布布扣  
this.H   = 0;
bubuko.com,布布扣  
this.L   = 0;
bubuko.com,布布扣  
this.T   = 0;
bubuko.com,布布扣  
this.dx  = 0;
bubuko.com,布布扣  
this.dy  = 0;
bubuko.com,布布扣  
this.px  = 0;
bubuko.com,布布扣  
this.py  = 0;
bubuko.com,布布扣  
this.dw  = 0;
bubuko.com,布布扣  
this.dh  = 0;
bubuko.com,布布扣  
this.pw  = 0;
bubuko.com,布布扣  
this.ph  = 0;
bubuko.com,布布扣  
this.ipx = 0;
bubuko.com,布布扣  
this.ipy = 0;
bubuko.com,布布扣  
this.idx = 0;
bubuko.com,布布扣  
this.idy = 0;
bubuko.com,布布扣
bubuko.com,布布扣  
this.GE2 = function (){
bubuko.com,布布扣   
with(this){
bubuko.com,布布扣    px 
-= dx * dR;
bubuko.com,布布扣    py 
-= dy * dR;
bubuko.com,布布扣    pw 
+= dw * dR;
bubuko.com,布布扣    ph 
+= dh * dR;
bubuko.com,布布扣    ipx 
-= idx * dR;
bubuko.com,布布扣    ipy 
-= idy * dR;
bubuko.com,布布扣
bubuko.com,布布扣    
with(obj.style){
bubuko.com,布布扣     left   
= Math.round(px);
bubuko.com,布布扣     top    
= Math.round(py);
bubuko.com,布布扣     width  
= Math.round(pw)+1;
bubuko.com,布布扣     height 
= Math.round(ph)+1;
bubuko.com,布布扣     
if(dR==-1)if(pw<=W+1)obj.style.visibility="hidden";
bubuko.com,布布扣    }

bubuko.com,布布扣
bubuko.com,布布扣    
with(img.style){
bubuko.com,布布扣     left   
= Math.round(ipx-oW);
bubuko.com,布布扣     top    
= Math.round(ipy-oH);
bubuko.com,布布扣    }

bubuko.com,布布扣
bubuko.com,布布扣    
if(++xrun>=NX*NY*SP){
bubuko.com,布布扣     xrun
=0;
bubuko.com,布布扣     run
=false;
bubuko.com,布布扣     
if(dR==-1)Parent.obj.style.zIndex = 0;
bubuko.com,布布扣     dR 
= -dR;
bubuko.com,布布扣    }

bubuko.com,布布扣   }

bubuko.com,布布扣  }

bubuko.com,布布扣
bubuko.com,布布扣  
this.GE1 = function (N1,N2){
bubuko.com,布布扣   
with(this){
bubuko.com,布布扣    
if(dR==1){
bubuko.com,布布扣     px  
= L;
bubuko.com,布布扣     py  
= T;
bubuko.com,布布扣     dx  
= ((Parent.L + L) - (x * Parent.W)) / SP;
bubuko.com,布布扣     dy  
= ((Parent.T + T) - (y * Parent.H)) / SP;
bubuko.com,布布扣     pw  
= W;
bubuko.com,布布扣     ph  
= H;
bubuko.com,布布扣     dw  
= (Parent.W - W) / SP;
bubuko.com,布布扣     dh  
= (Parent.H - H) / SP;
bubuko.com,布布扣     ipx 
= -L;
bubuko.com,布布扣     ipy 
= -T;
bubuko.com,布布扣     idx 
= ((x * Parent.W) - L) / SP;
bubuko.com,布布扣     idy 
= ((y * Parent.H) - T) / SP;
bubuko.com,布布扣    }

bubuko.com,布布扣    obj.style.visibility
="visible";
bubuko.com,布布扣    
if(img.height>document.body.offsetHeight)oH=(img.height-document.body.offsetHeight)/2else oH = 0;
bubuko.com,布布扣    
if(img.width>document.body.offsetWidth/2)oW=(img.width-(document.body.offsetWidth/2))/2else oW = 0;
bubuko.com,布布扣    
for(i=0;i<SP;i++) setTimeout("object["+N1+"].object["+N2+"].GE2()",16*i);
bubuko.com,布布扣   }

bubuko.com,布布扣  }

bubuko.com,布布扣
bubuko.com,布布扣  
this.DOOT = function (){
bubuko.com,布布扣   
with(this){
bubuko.com,布布扣    W 
=  Parent.W  / NX;
bubuko.com,布布扣    H 
=  Parent.H / NY;
bubuko.com,布布扣    L 
=  x * W;
bubuko.com,布布扣    T 
=  y * H;
bubuko.com,布布扣   }

bubuko.com,布布扣  }

bubuko.com,布布扣 }

bubuko.com,布布扣
bubuko.com,布布扣 
var  k = 0;
bubuko.com,布布扣 
for(var i=0;i<NY;i++)
bubuko.com,布布扣  
for(var j=0;j<NX;j++)
bubuko.com,布布扣   
this.object[k++= new CImg(this,i,j);
bubuko.com,布布扣
bubuko.com,布布扣 
this.GE1  = function (){
bubuko.com,布布扣  
with(this){
bubuko.com,布布扣   
if(!run){
bubuko.com,布布扣    TXTBOX.innerHTML 
= "<div style=‘margin:2%‘>"+TXTSRC[N%nI].innerHTML+"</div>";
bubuko.com,布布扣    run 
= true;
bubuko.com,布布扣    obj.style.zIndex 
= 1;
bubuko.com,布布扣    
for(var i=0;i<NX*NY;i++) setTimeout("object["+N+"].object["+i+"].GE1("+N+","+i+")",i*DELAY);
bubuko.com,布布扣   }

bubuko.com,布布扣  }

bubuko.com,布布扣 }

bubuko.com,布布扣
bubuko.com,布布扣 
this.DOOT = function (){
bubuko.com,布布扣  
with(this){
bubuko.com,布布扣   
if(img.width<iW)iW=img.width;
bubuko.com,布布扣   
if(img.height<iH)iH=img.height;
bubuko.com,布布扣   
with(obj.style){
bubuko.com,布布扣    W 
= width  = iW  / NX;
bubuko.com,布布扣    H 
= height = iH / NY;
bubuko.com,布布扣    L 
= left   = x * W;
bubuko.com,布布扣    T 
= top    = y * H;
bubuko.com,布布扣   }

bubuko.com,布布扣   
with(img.style){
bubuko.com,布布扣    width  
= W;
bubuko.com,布布扣    height 
= H;
bubuko.com,布布扣   }

bubuko.com,布布扣   
for(var i in object) object[i].DOOT();
bubuko.com,布布扣  }

bubuko.com,布布扣 }

bubuko.com,布布扣}

bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣onload 
= function() {
bubuko.com,布布扣 IMGSRC 
= document.getElementById("imgsrc").getElementsByTagName("img");
bubuko.com,布布扣 TXTSRC 
= document.getElementById("txtsrc").getElementsByTagName("div");
bubuko.com,布布扣 IMGBOX 
= document.getElementById("imgbox");
bubuko.com,布布扣 TXTBOX 
= document.getElementById("txtbox");
bubuko.com,布布扣 CENTER 
= document.getElementById("center");
bubuko.com,布布扣 iH 
= document.body.offsetHeight;
bubuko.com,布布扣 iW 
= document.body.offsetWidth/2;
bubuko.com,布布扣 nI 
= IMGSRC.length;
bubuko.com,布布扣 
var k = 0;
bubuko.com,布布扣 
for(var i=0;i<NY;i++){
bubuko.com,布布扣  
for(var j=0;j<NX;j++){
bubuko.com,布布扣   object[k] 
= new CObj(k,i,j);
bubuko.com,布布扣   object[k
++].DOOT();
bubuko.com,布布扣  }

bubuko.com,布布扣 }

bubuko.com,布布扣 IMGBOX.style.width  
= iW;
bubuko.com,布布扣 IMGBOX.style.height 
= iH;
bubuko.com,布布扣 TXTBOX.style.width  
= iW;
bubuko.com,布布扣 TXTBOX.style.height 
= iH;
bubuko.com,布布扣 TXTBOX.style.left   
= iW;
bubuko.com,布布扣 TXTBOX.style.visibility
="visible";
bubuko.com,布布扣 CENTER.style.left   
= -iW;
bubuko.com,布布扣 CENTER.style.top    
= -iH/2;
bubuko.com,布布扣}

bubuko.com,布布扣
//-->
bubuko.com,布布扣
</script>
bubuko.com,布布扣
</head>
bubuko.com,布布扣
bubuko.com,布布扣
<body>
bubuko.com,布布扣
<div style="position:absolute;left:50%;top:50%;"><div id="center" style="position:absolute;">
bubuko.com,布布扣
bubuko.com,布布扣 
<div id="imgbox" style="position:absolute;left:0;top:0;overflow:hidden;"></div>
bubuko.com,布布扣 
<div id="txtbox" style="position:absolute;visibility:hidden;overflow:hidden;background:#333;color:#FFF;font-family:verdana;font-size:0.8em;">
bubuko.com,布布扣  
<div style="margin:2%">
bubuko.com,布布扣  
<h2>IMGBOX</h2>Click the thumbnails on the left for a larger image. The description connected to the clicked image is displayed here.<br>
bubuko.com,布布扣  
<br>Note: for performance reasons, images are not resized and must be all of the same size.
bubuko.com,布布扣  
</div>
bubuko.com,布布扣 
</div>
bubuko.com,布布扣
bubuko.com,布布扣
bubuko.com,布布扣
</div></div>
bubuko.com,布布扣
bubuko.com,布布扣
<div id="imgsrc" style="visibility:hidden">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9097.jpg">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9092.jpg">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9084.jpg">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9064.jpg">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9050.jpg">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9070.jpg">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9079.jpg">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9068.jpg">
bubuko.com,布布扣 
<img src="http://www.webjx.com/upfiles/20050411/BS9039.jpg">
bubuko.com,布布扣
</div>
bubuko.com,布布扣
bubuko.com,布布扣
<div id="txtsrc" style="visibility:hidden">
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>the river</h2><br>Awaken from my nap by the river
bubuko.com,布布扣 
</div>
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>transparency</h2><br>Its transparency was hypnotizing.
bubuko.com,布布扣 
</div>
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>cold</h2><br>Currents of cold water played with light.
bubuko.com,布布扣 
</div>
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>sank in</h2><br>I threw a few nuts into the river. They floated for a while, then sank in.
bubuko.com,布布扣 
</div>
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>masked</h2><br>A wide stepping stone masked the water‘s depth.
bubuko.com,布布扣 
</div>
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>a glimpse</h2><br>Later on, I had a glimpse of the river‘s bed.
bubuko.com,布布扣 
</div>
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>forgotten</h2><br>The wheelchair made a noise. Again, I had forgotten about my legs.
bubuko.com,布布扣 
</div>
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>floated</h2><br>Still, I floated in oblivion of things too real.
bubuko.com,布布扣 
</div>
bubuko.com,布布扣 
<div>
bubuko.com,布布扣  
<h2>for me</h2><br>I stared fixedly at the water‘s open arms. The stream was singing for me.
bubuko.com,布布扣 
</div>
bubuko.com,布布扣
</div>
bubuko.com,布布扣
bubuko.com,布布扣
<!-- crossbrowser images_loading_bar - Gerard Ferrandez - www.dhteumeuleu.com - Feb 2005 -->
bubuko.com,布布扣
<span id=LB0 style="position:absolute;left:50%;top:50%;"><span style="position:absolute;font-family:arial;font-size:10px;color:#FFFFFF;left:-50;top:-18">Loading...</span>
bubuko.com,布布扣
<span style="position:absolute;left:-50;top:-5;font-size:1px;width:100;height:10px;background:#333"><span id=LB1 style="position:absolute;left:0;top:0;font-size:1px;width:0;height:10px;background:#FFFFFF"></span></span></span>
bubuko.com,布布扣
<script>m00=document.getElementById("imgsrc").getElementsByTagName("img");m01=m00.length;function images_loading_bar(){m02=0;for(i=0;i<m01;i++)m02+=(m00[i].complete)?1:0;document.getElementById("LB1").style.width=Math.round(m02/m01*100);if(m02==m01)setTimeout("document.getElementById(‘LB0‘).style.display=‘none‘",128); else setTimeout("images_loading_bar()"64);};images_loading_bar();</script>
bubuko.com,布布扣
<!-- end of images_loading_bar code -->
bubuko.com,布布扣
bubuko.com,布布扣
</body>
bubuko.com,布布扣
</html>

图片轮显效果大全

标签:des   style   blog   http   color   io   os   ar   java   

原文地址:http://www.cnblogs.com/blfshiye/p/4004040.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!