jQuery實作仿Alipay支付寶首頁全螢幕焦點圖切換特效_jquery
本文實例講述了jQuery實現仿Alipay支付寶首頁全螢幕焦點圖切換特效。分享給大家供大家參考。具體實作方法如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>kinMaxShow 扩展效果</title> <link type="text/css" href="_doc/base.css" rel="stylesheet" /> <style type="text/css"> body{ margin:0; padding:0;} #Login{ position:relative;} #loginPlane{ position:absolute;width:100%; height:330px; top:0; left:0;z-index:88; } #loginWrap{ width:960px;margin:0 auto; padding-top:20px; } #loginBox{ width:286px;height:330px; filter:progid:DXImageTransform.Microsoft.gradient( startcolorstr=#88000000,endcolorstr=#88000000); background:rgba(0,0,0,0.2); float:right; margin-right:20px; } #loginBox h3{ border-bottom:1px solid #ccc; margin:10px; color:#fff; font-weight:normal; font-size:16px; line-height:26px; } #loginBox form{ color:#fff; font-size:12px; padding:8px 0 0 20px } #loginBox .text{ padding:4px;border:1px solid; border-color:#aaa #ddd #ddd #aaa; height:20px; width:230px; font-family:Verdana } #loginBox .submit{ color:#fff; border:0; background:#FFA600;width:236px; height:35px; font-weight:bold; font-family:"Microsoft Yahei"; font-size:14px; } #kinMaxShow{ display:none;} #kinMaxShow .sub_1_1{ display:block; position:absolute;left:110px; top:136px; } #kinMaxShow .sub_1_2{ display:block; position:absolute;left:110px; top:120px; } #kinMaxShow .sub_2_1{ display:block; position:absolute;left:-160px; bottom:0px; } #kinMaxShow .sub_2_2{ display:block; position:absolute;left:110px; top:20px; } #kinMaxShow .sub_3_1{ display:block; position:absolute;right:180px; bottom:0px; } #kinMaxShow .sub_3_2{ display:block; position:absolute;left:30px; top:40px; } </style> <script src="js/jquery-1.10.2.min.js" type="text/javascript"></script> <script src="js/jquery.kinMaxShow-1.1.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function(){ $("#kinMaxShow").kinMaxShow({ height:400, button:{ showIndex:false, normal:{background:'url(images/button.png) no-repeat -14px 0', marginRight:'8px',border:'0',right:'44%',bottom:'20px' }, focus:{background:'url(images/button.png) no-repeat 0 0', border:'0' } }, callback:function(index,action){ switch(index){ case 0 : if(action=='fadeIn'){ $(this).find('.sub_1_1').animate({left:'70px'},600) $(this).find('.sub_1_2').animate({top:'60px'},600) }else{ $(this).find('.sub_1_1').animate({left:'110px'},600) $(this).find('.sub_1_2').animate({top:'120px'},600) }; break; case 1 : if(action=='fadeIn'){ $(this).find('.sub_2_1').animate({left:'-100px'},600) $(this).find('.sub_2_2').animate({top:'60px'},600) }else{ $(this).find('.sub_2_1').animate({left:'-160px'},600) $(this).find('.sub_2_2').animate({top:'20px'},600) }; break; case 2 : if(action=='fadeIn'){ $(this).find('.sub_3_1').animate({right:'350px'},600) $(this).find('.sub_3_2').animate({left:'180px'},600) }else{ $(this).find('.sub_3_1').animate({right:'180px'},600) $(this).find('.sub_3_2').animate({left:'30px'},600) }; break; } } }); }); </script> </head> <body> <div id="Login"> <div id="kinMaxShow"> <div> <img src="images/1.jpg" /> <div> <img class="sub_1_1" src="images/sub_1_1.png" /> <img class="sub_1_2" src="images/sub_1_2.png" usemap="#Map_1_2" border="0" /> <map name="Map_1_2" id="Map_1_2"> <area shape="rect" coords="2,96,106,123" href="http://www.jb51.net" target="_blank"/> </map> </div> </div> <div> <img src="images/2.jpg" /> <div> <img class="sub_2_1" src="images/sub_2_1.png" /> <img class="sub_2_2" src="images/sub_2_2.png" usemap="#Map_2_2" border="0" /> <map name="Map_2_2" id="Map_2_2"> <area shape="rect" coords="3,97,104,124" href="http://www.jb51.net" target="_blank"/> </map> </div> </div> <div> <img src="images/3.jpg" /> <div> <img class="sub_3_1" src="images/sub_3_1.png" /> <img class="sub_3_2" src="images/sub_3_2.png" usemap="#Map_3_2" border="0" /> <map name="Map_3_2" id="Map_3_2"> <area shape="rect" coords="1,98,106,124" href="http://www.jb51.net" target="_blank"/> </map> </div> </div> </div> <div id="loginPlane"> <div id="loginWrap"> <div id="loginBox"> <h3>登陆支付宝</h3> <form> <label>账户名:</label> <p><input type="text" class="text" /></p> <label>登陆密码:</label> <p><input type="password" class="text" /></p> <br /> <p><input type="button" value=" 登 陆 " class="submit" /></p> </form> </div> </div> </div> </div> </body> </html>
jquery.kinMaxShow-1.1.min.js點此本站下載。
希望本文所述對大家的jQuery程式設計有所幫助。

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

熱門話題

jQuery引用方法詳解:快速上手指南jQuery是一個受歡迎的JavaScript庫,被廣泛用於網站開發中,它簡化了JavaScript編程,並為開發者提供了豐富的功能和特性。本文將詳細介紹jQuery的引用方法,並提供具體的程式碼範例,幫助讀者快速上手。引入jQuery首先,我們需要在HTML檔案中引入jQuery函式庫。可以透過CDN連結的方式引入,也可以下載

jQuery中如何使用PUT請求方式?在jQuery中,發送PUT請求的方法與發送其他類型的請求類似,但需要注意一些細節和參數設定。 PUT請求通常用於更新資源,例如更新資料庫中的資料或更新伺服器上的檔案。以下是在jQuery中使用PUT請求方式的具體程式碼範例。首先,確保引入了jQuery庫文件,然後可以透過以下方式發送PUT請求:$.ajax({u

jQuery是一款廣泛應用於前端開發的快速、小巧、功能豐富的JavaScript庫。自2006年發布以來,jQuery已成為眾多開發者的首選工具之一,但在實際應用中,它也不乏一些優點和缺點。本文將深度剖析jQuery的優勢與劣勢,並結合具體的程式碼範例進行說明。優點:1.簡潔的語法jQuery的語法設計簡潔明了,可以大幅提升程式碼的可讀性和編寫效率。比如,

jQuery如何移除元素的height屬性?在前端開發中,經常會遇到需要操作元素的高度屬性的需求。有時候,我們可能需要動態改變元素的高度,而有時候又需要移除元素的高度屬性。本文將介紹如何使用jQuery來移除元素的高度屬性,並提供具體的程式碼範例。在使用jQuery操作高度屬性之前,我們首先需要了解CSS中的height屬性。 height屬性用於設定元素的高度

標題:jQuery小技巧:快速修改頁面所有a標籤的文字在網頁開發中,我們經常需要對頁面中的元素進行修改和操作。使用jQuery時,有時候需要一次修改頁面中所有a標籤的文字內容,這樣可以節省時間和精力。以下將介紹如何使用jQuery快速修改頁面所有a標籤的文本,同時給出具體的程式碼範例。首先,我們需要引入jQuery庫文件,確保在頁面中引入了以下程式碼:<

標題:使用jQuery修改所有a標籤的文字內容jQuery是一款受歡迎的JavaScript庫,被廣泛用於處理DOM操作。在網頁開發中,經常會遇到需要修改頁面上連結標籤(a標籤)的文字內容的需求。本文將介紹如何使用jQuery來實現這個目標,並提供具體的程式碼範例。首先,我們需要在頁面中引入jQuery庫。在HTML檔案中加入以下程式碼:

如何判斷jQuery元素是否具有特定屬性?在使用jQuery操作DOM元素時,常會遇到需要判斷元素是否具有某個特定屬性的情況。在這種情況下,我們可以藉助jQuery提供的方法來輕鬆實現這項功能。以下將介紹兩種常用的方法來判斷一個jQuery元素是否具有特定屬性,並附上具體的程式碼範例。方法一:使用attr()方法和typeof運算子//判斷元素是否具有特定屬

jQuery是一種流行的JavaScript庫,被廣泛用於處理網頁中的DOM操作和事件處理。在jQuery中,eq()方法是用來選擇指定索引位置的元素的方法,具體使用方法和應用場景如下。在jQuery中,eq()方法選擇指定索引位置的元素。索引位置從0開始計數,即第一個元素的索引是0,第二個元素的索引是1,依此類推。 eq()方法的語法如下:$("s
