日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
jquery版結(jié)婚電子請(qǐng)?zhí)?/div>

老姐看了jquery版小型婚禮(可動(dòng)態(tài)添加祝福語(yǔ)),覺(jué)得還不錯(cuò),就讓我給他們做一個(gè)電子請(qǐng)?zhí)?。已?jīng)做了大半年了,懶著一直沒(méi)發(fā)……趁現(xiàn)在想起來(lái)了,就趕緊放上來(lái)讓大家看看。

一、圖片展示

1.開(kāi)場(chǎng)動(dòng)畫(huà)

新人開(kāi)著小轎車緩緩向我們駛來(lái),從這頭到那頭,其中的滋味醉在心頭。

2.首頁(yè)

首頁(yè)包括相冊(cè)、邀請(qǐng)函、祝福墻和婚禮地址。

1).相冊(cè)

相冊(cè)集,由12張小圖片組成一個(gè)心形,圖片自循環(huán)逐張變大再變小。

2).邀請(qǐng)函

兩情相悅只要證到手,又啟在朝朝暮暮。

3).祝福墻

祝福墻動(dòng)畫(huà):

留言板:

4).婚禮地址

#p#

二、代碼展示

1.html代碼

 
 
  1.  
  2.  
  3.    
  4.        
  5.      
  6.      
  7.      
  8.    
  9.    
  10.    
  11.    
  12.      
  13.          
  14.          
  15.              
  16.              
  17.         
 
  •  
  •          
  •          
  •              
  •                 
       
    •                     
    • 相冊(cè)
    •  
    •                     
    • 邀請(qǐng)函
    •  
    •                     
    • 祝福墻
    •  
    •                     
    • 婚禮地點(diǎn)
    •  
    •                 
     
  •             
  •  
  •         
  •  
  •  
  •          
  •          
  •              
  •              
  •             
  •  
  •         
  •  
  •  
  •          
  •          
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •         
  •  
  •  
  •          
  •          
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •             
     
  •         
  •  
  •  
  •          
  •          
  •              
  •             點(diǎn)我送祝福
  •  
  •              
  •                 
  •  
  •                 
  •  
  •                 
  •  
  •                 
  •  
  •                 
  •  
  •                  
  •                  
  •                  
  •                  
  •                  
  •                  
  •                  
  •                 一定要幸福哦~ 
  •                 祝你們白頭偕老! 
  •                 早生貴子~ 
  •                 新婚快樂(lè)~ 
  •                 生個(gè)寶寶認(rèn)我做干媽! 
  •                 喜結(jié)良緣O(∩_∩)O哈哈哈~ 
  •                 一定要幸福哦~ 
  •                 祝你們白頭偕老! 
  •                 早生貴子~ 
  •                 新婚快樂(lè)~ 
  •                 生個(gè)寶寶認(rèn)我做干媽! 
  •                 喜結(jié)良緣O(∩_∩)O哈哈哈~ 
  •              
  •          
  •  
  •  
  •          
  •          
  •              
  •              
  •              
  •              
  •              
  •              
  •              
  •              
  •              
  •              
  •              
  •              
  •              
  •          
  •  
  •  
  •          
  •          
  •              
  •              
  •              
  •          
  •  
  •      
  •  
  •      
  •      
  •      
  •         

    送上祝福語(yǔ)

     
  •         寫(xiě)上您的祝福吧~ 
  •         確定 
  •      
  •  
  •      
  •      
  •          
  •          
  •          
  •          
  •      
  •  
  •      
  •      
  •      
  •  
  •    
  •  
  •  

    2.js代碼

     
     
    1. var sceneObject = { 
    2.     init: function(){ 
    3.         this._enterCar(); 
    4.         this._enterInvitation(); 
    5.         this._enterAlbum(); 
    6.         this._enterWall(); 
    7.         this._addBlessing(); 
    8.         this._searchAddress(); 
    9.     }, 
    10.     /*---------------------------------移動(dòng)的婚車------------------------------*/ 
    11.     _enterCar: function(){ 
    12.         initCar(); 
    13.  
    14.         /* 婚車隨著窗口大小改變 */ 
    15.         $(window).resize(function(){ 
    16.             setCarPosition(); 
    17.         }) 
    18.     }, 
    19.     /*---------------------------------進(jìn)入邀請(qǐng)函------------------------------*/ 
    20.     _enterInvitation: function(){ 
    21.          var $home = $(".home"), /* 首頁(yè) */ 
    22.             $toInvitation = $("#to-invitation"), /* 邀請(qǐng)函按鈕 */ 
    23.             $invitation = $(".invitation"), /* 邀請(qǐng)函模塊 */ 
    24.             $invitationCt = $(".invitation-content"), /* 邀請(qǐng)函內(nèi)容 */ 
    25.             $inviteReturn = $("#invite-return"); 
    26.  
    27.         $toInvitation.click(function(){ 
    28.             $home.fadeOut(); /* 隱藏首頁(yè) */ 
    29.             $invitation.fadeIn(); 
    30.             $invitationCt.animate({"top": "0"},function(){ 
    31.                 $inviteReturn.fadeIn(); 
    32.             }); 
    33.         }) 
    34.          
    35.         /* 邀請(qǐng)函中點(diǎn)擊返回按鈕 */ 
    36.         $inviteReturn.click(function(){ 
    37.             $invitationCt.css({"top": "-540px"}); 
    38.             $invitation.fadeOut(function(){ 
    39.                 $inviteReturn.fadeOut(); 
    40.                 $home.fadeIn(600); 
    41.             }); 
    42.         }) 
    43.     }, 
    44.      /*---------------------------------進(jìn)入相冊(cè)------------------------------*/ 
    45.     _enterAlbum: function(){ 
    46.         var $home = $(".home"), /* 首頁(yè) */ 
    47.              $toPicture = $("#to-picture"), 
    48.              $pictureWall = $(".picture-wall"), 
    49.              timer; 
    50.  
    51.         $toPicture.click(function(){ 
    52.             $home.fadeOut(function(){/* 隱藏首頁(yè) */ 
    53.                 $pictureWall.fadeIn(); /* 顯示相冊(cè) */ 
    54.                 autoPicWall(); 
    55.                 timer = setInterval(autoPicWall,4000); /* 照片自動(dòng)播放 */ 
    56.             }); 
    57.         }) 
    58.  
    59.         /* 點(diǎn)擊照片墻中返回按鈕 */ 
    60.         $("#picture-return").click(function(){ 
    61.             clearInterval(timer); /* 返回首頁(yè)時(shí)清除循環(huán) */ 
    62.             picPage = 0; /* 并且顯示圖片為0,也就是下一次進(jìn)入時(shí)又從0開(kāi)始 */ 
    63.             $pictureWall.fadeOut(function(){ 
    64.                 $home.fadeIn(); 
    65.             }) 
    66.         }) 
    67.     }, 
    68.      /*---------------------------------進(jìn)入祝福墻-------------------------------*/ 
    69.     _enterWall: function(){ 
    70.         var $home = $(".home"), 
    71.                 $uEnter = $("#to-wall"); /* 進(jìn)入祝福墻按鈕 */ 
    72.                  
    73.  
    74.         $uEnter.click(function(){ 
    75.             $home.hide(); 
    76.             setTimeout(scene6,400); /* 進(jìn)入祝福墻場(chǎng)景動(dòng)畫(huà) */ 
    77.         }) 
    78.     }, 
    79.     /*---------------------------------添加祝福語(yǔ)-------------------------------*/ 
    80.     _addBlessing: function(){ 
    81.            var $home = $(".home"), 
    82.                 $sevenDiv = $(".seven-content div"), 
    83.                 $clickMe = $(".clickMe"), 
    84.                 $mask = $(".mask"), 
    85.                 $popBox = $(".pop-box"), 
    86.                 $write = $("#write"), 
    87.                 $uSure = $("#uSure"), 
    88.                 $sevenContent = $(".seven-content"); 
    89.  
    90.         /* 拖動(dòng)祝??ㄆ?nbsp;*/ 
    91.         draggableNote(); 
    92.  
    93.          /* 點(diǎn)我送祝福 */ 
    94.         $clickMe.click(function(){ 
    95.             $write.val("送上您的祝福吧~"); 
    96.             $mask.fadeIn(); 
    97.             $popBox.animate({top: "50%"}); 
    98.         }) 
    99.  
    100.         /* 獲取焦點(diǎn)時(shí) */ 
    101.         $write.focus(function(){ 
    102.             var _val = $(this).val(); 
    103.             if(_val == "送上您的祝福吧~"){ 
    104.                 $(this).val(""); 
    105.             } 
    106.         }) 
    107.         /* 丟失焦點(diǎn)時(shí) */ 
    108.         $write.blur(function(){ 
    109.             var _val = $(this).val(); 
    110.             if(_val.length == 0){ 
    111.                 $(this).val("送上您的祝福吧~"); 
    112.             } 
    113.         }) 
    114.  
    115.         /* 確定添加祝福語(yǔ) */ 
    116.         $uSure.click(function(){ 
    117.             var _writeVal = $write.val(), 
    118.                  _randomNum = Math.ceil(Math.random()*6); 
    119.  
    120.             if(_writeVal != "送上您的祝福吧~"){ 
    121.                 var _div = ''+_writeVal+''; 
    122.                 $sevenContent.append(_div); /* 如果輸入祝福語(yǔ),將此標(biāo)簽添加的尾部 */ 
    123.                 defineSevenDiv($sevenContent.find("div:last")); 
    124.                 $popBox.animate({top: "-300px"},function(){ 
    125.                     $mask.fadeOut(); 
    126.                     draggableNote(); /* 可拖動(dòng)卡片,給新添加的標(biāo)簽賦予拖動(dòng)功能 */ 
    127.                 }); 
    128.             }else{ 
    129.                 alert("請(qǐng)輸入祝福語(yǔ)!"); 
    130.             } 
    131.         }) 
    132.  
    133.         /* 祝福墻中返回首頁(yè) */ 
    134.         $("#blessing-return").click(function(){ 
    135.             $(".seven-box").fadeOut(function(){ 
    136.                 $home.fadeIn(); 
    137.             }) 
    138.         }) 
    139.     }, 
    140.      /*---------------------------------查看婚禮地址-------------------------------*/ 
    141.     _searchAddress: function(){ 
    142.         var $home = $(".home"), 
    143.              $toAddress = $("#to-address"); /* 婚禮地址導(dǎo)航 */ 
    144.              $address = $(".address"), /* 婚禮地址圖 */ 
    145.              $addressReturn = $("#address-return"); 
    146.  
    147.         $toAddress.click(function(){ 
    148.             $home.fadeOut(); 
    149.             $address.fadeIn(); 
    150.         }) 
    151.  
    152.         /* 婚禮地址返回首頁(yè) */ 
    153.         $addressReturn.click(function(){ 
    154.             $address.fadeOut(); 
    155.             $home.fadeIn(); 
    156.         }) 
    157.     } 
    158.  
    159.  
    160. /*---------------------------------移動(dòng)的小車-------------------------------*/ 
    161. function initCar(){ 
    162.     var $home = $(".home"); /* 首頁(yè) */ 
    163.     setCarPosition(); 
    164.     setTimeout(function(){ 
    165.         $home.fadeIn(); 
    166.     },6500); 
    167.  
    168. /* 婚車位置定位和滑動(dòng)方法 */ 
    169. function setCarPosition(){ 
    170.     var $car = $(".car"), 
    171.           wWidth = $(window).width(), /* 文檔寬度 */ 
    172.           wHeight = $(window).height(), /* 窗口高度 */ 
    173.           carWidth = $car.height(), /* 婚車寬度 */ 
    174.           carHeight = $car.height(); /* 婚車高度 */ 
    175.     $car.css({top:wHeight - carHeight - 100}); 
    176.     $car.animate({left: wWidth - carWidth + 100},8000).fadeOut(); 
    177.  
    178.  
    179. /*---------------------------------圖片墻-------------------------------*/ 
    180. var  picPage = 0, /* 當(dāng)前是第幾張圖片放大和縮小 */ 
    181.        picLeft, /* 圖片左邊距離 */ 
    182.        picTop; /* 圖片上部定位距離 */ 
    183.  
    184. /* 自動(dòng)放大縮小圖片方法 */ 
    185. function autoPicWall(){ 
    186.     var $pictureWallPic = $(".picture-wall div"), 
    187.          $own = $pictureWallPic.eq(picPage), 
    188.          isBig = $own.hasClass("bigCenter"), /* 放大時(shí)有這個(gè)class */ 
    189.          hasClassPicRow = $own.hasClass("picRow"); /* 判斷圖片是行的(就是寬大于高) */ 
    190.  
    191.     /* 調(diào)用圖片放大 */ 
    192.     becomeBig($own,hasClassPicRow); 
    193.  
    194.     /* 隔2秒圖片自動(dòng)縮小 */ 
    195.     setTimeout(function(){becomeSmall($own,hasClassPicRow);},2000); 
    196.  
    197.     /* 保證當(dāng)前放大圖片為圖片總個(gè)數(shù)內(nèi),也就是說(shuō)存在這個(gè)圖片 */ 
    198.     if(picPage < $pictureWallPic.length - 1){ 
    199.         picPage++; 
    200.     }else if(picPage == $pictureWallPic.length - 1){ /* 如果當(dāng)前圖片為***一張圖片,則又從***張圖片開(kāi)始顯示 */ 
    201.         picPage = 0; 
    202.     } 
    203.  
    204.  
    205. /* 圖片變大方法 */ 
    206. function becomeBig($own,hasClassPicRow){ 
    207.     var $mask = $(".mask"), 
    208.           pictureWallWidth = $(".picture-wall").width(), 
    209.           pictureWallHeight = $(".picture-wall").height(); 
    210.  
    211.     picLeft = $own.css("left"); /* 原始絕對(duì)定位left值 */ 
    212.     picTop = $own.css("top"); /* 原始絕對(duì)定位top值 */ 
    213.     $own.toggleClass("bigCenter"); /* 添加放大的class屬性 */ 
    214.     $mask.fadeIn(); 
    215.  
    216.     /* 圖片為行圖片,也就是寬度大于高度 */ 
    217.     if(hasClassPicRow){ 
    218.         for(var i = 120; i < 720; i+=20){ 
    219.             $own.find("img").animate({"width": i+"px", "height": i/1.5+"px"},2); 
    220.             $own.animate({"left": (pictureWallWidth-i)/2+"px", "top": (pictureWallHeight-i/1.5)/2+"px"},2); 
    221.         } 
    222.     }else{ 
    223.         for(var i = 80; i < 480; i+=20){ 
    224.             $own.find("img").animate({"width": i+"px", "height": i*1.5+"px"},2); 
    225.             $own.animate({"left": (pictureWallWidth-i)/2+"px", "top": (pictureWallHeight-i*1.5)/2+"px"},2); 
    226.         } 
    227.     } 
    228.  
    229. /* 圖片縮小方法 */ 
    230. function becomeSmall($own,hasClassPicRow){ 
    231.     var $mask = $(".mask"), 
    232.           pictureWallWidth = $(".picture-wall").width(), 
    233.           pictureWallHeight = $(".picture-wall").height(); 
    234.  
    235.     if(hasClassPicRow){ 
    236.         for(var i = 720; i >= 120; i-=40){ 
    237.             $own.find("img").animate({"width": i+"px", "height": i/1.5+"px"},2); 
    238.             /* 圖片縮小到中心位置 */ 
    239.             $own.animate({"left": (pictureWallWidth-i)/2+"px", "top": (pictureWallHeight-i/1.5)/2+"px"},2); 
    240.         } 
    241.     }else{ 
    242.         for(var i = 480; i >= 80; i-=40){ 
    243.             $own.find("img").animate({"width": i+"px", "height": i*1.5+"px"},2); 
    244.             /* 圖片縮小到中心位置 */ 
    245.             $own.animate({"left": (pictureWallWidth-i)/2+"px", "top": (pictureWallHeight-i*1.5)/2+"px"},2); 
    246.         } 
    247.     } 
    248.      
    249.     /* 圖片縮小到中心位置后,回到原始位置 */ 
    250.     $own.animate({"left": picLeft, "top": picTop},400,function(){ 
    251.         $mask.fadeOut(); /* 隱藏遮罩層 */ 
    252.         $own.toggleClass("bigCenter"); /* 去除放大的class屬性 */ 
    253.     }); 
    254.  
    255.  
    256.                  
    257. /*---------------------------------祝福墻進(jìn)入動(dòng)畫(huà)-------------------------------*/ 
    258. var colCount = 4, /* 多少列 */ 
    259.         rowCount = 4, /* 多少行 */ 
    260.      
      網(wǎng)站名稱:jquery版結(jié)婚電子請(qǐng)?zhí)?
      本文路徑:http://www.dlmjj.cn/article/dpddgei.html