做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

jQuery實現撲克正反面翻牌效果實例分享

來源:懂視網 責編:小OO 時間:2020-11-27 20:05:07
文檔

jQuery實現撲克正反面翻牌效果實例分享

效果圖。代碼如下:<。=';x';&& direction,width: 0},speed.function() { $front.hide();$behind.show().animate({left: 0,width: dis},speed);});}else{ $front.animate({top: dis/2,height: 0},speed.function() { $front.hide();$behind.show().animate({top: 0,height: dis}。相關推薦。CSS3實現動態翻牌效果。3D翻牌的10篇內容推薦。jQuery實現個性翻牌效果導航菜單的方法_jquery。
推薦度:
導讀效果圖。代碼如下:<。=';x';&& direction,width: 0},speed.function() { $front.hide();$behind.show().animate({left: 0,width: dis},speed);});}else{ $front.animate({top: dis/2,height: 0},speed.function() { $front.hide();$behind.show().animate({top: 0,height: dis}。相關推薦。CSS3實現動態翻牌效果。3D翻牌的10篇內容推薦。jQuery實現個性翻牌效果導航菜單的方法_jquery。
本文主要介紹了jQuery實現撲克正反面翻牌效果的實例。具有很好的參考價值。下面跟著小編一起來看下吧,希望能幫助到大家。

效果圖:

代碼如下:

<!DOCTYPE>
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>【JQuery插件】撲克正反面翻牌效果</title>
 <style>
 *{margin:0px;padding:0px;list-style:none;font-size: 16px;}
 </style>
 </head>
 <body>
 <style>
 .demo1 {margin:10px; width: 200px;height: 100px;text-align: center;position: relative;}
 .demo1 .front{width: 200px;height: 100px;position:absolute;left:0px;top:0px;background-color: #000;color: #fff;}
 .demo1 .behind{width: 200px;height: 0px;position:absolute;left:0px;top:50px;background-color: #ccc;color: #000;display: none;}
 </style>
 <h1>demo1 y軸 (css布局提示:背面默認隱藏 height為0 top是高度的一半也就是demo中間)</h1>
 <p class="demo1">
 <p class="front">正面正面正<br/>面正面正面<br/></p>
 <p class="behind">背面</p>
 </p>
 <p class="demo1">
 <p class="front">正面</p>
 <p class="behind">背面</p>
 </p>
 <style>
 .demo2 {margin:10px; width: 200px;height: 100px;text-align: center;position: relative;}
 .demo2 .front{width: 200px;z-index: 1; height: 100px;position:absolute;left:0px;top:0px;background-color: #000;color: #fff;}
 .demo2 .behind{width: 0;height: 100px;z-index: 0;position:absolute;left:100px;top:0;background-color: #ccc;color: #000;}
 </style>
 <h1>demo2 x軸(css布局提示:背面默認隱藏 width為0 left是寬度的一半也就是demo中間)</h1>
 <p class="demo2">
 <p class="front">正面</p>
 <p class="behind">背面</p>
 </p>
 <p class="demo2">
 <p class="front">正面</p>
 <p class="behind">背面</p>
 </p>
<script type="text/javascript" src="http://static.cnmo-img.com.cn/js/jquery144p.js"></script>
<script>
(function($) {
 /*
 ====================================================
 【JQuery插件】撲克翻牌效果
 @auther LiuMing
 @blog http://www.cnblogs.com/dtdxrk/
 ====================================================
 @front:正面元素
 @behind:背面元素
 @direction:方向
 @dis:距離
 @mouse: 'enter' 'leave' 判斷鼠標移入移出
 @speed: 速度 不填默認速度80 建議不要超過100
 */
 var OverTurnAnimate = function(front, behind, direction, dis, mouse, speed){
 /*判斷移入移出*/
 var $front = (mouse == 'enter') ? front : behind,
 $behind = (mouse == 'enter') ? behind : front;
 $front.stop();
 $behind.stop();
 if(direction == 'x'){
 $front.animate({left: dis/2,width: 0},speed, function() {
 $front.hide();
 $behind.show().animate({left: 0,width: dis},speed);
 });
 }else{
 $front.animate({top: dis/2,height: 0},speed, function() {
 $front.hide();
 $behind.show().animate({top: 0,height: dis},speed);
 });
 }
 };
 /*
 @demo
 $('.demo1').OverTurn(@direction, @speed);
 @direction(String)必選 'y' || 'x' 方向
 @speed(Number)可選 速度
 */
 $.fn.OverTurn = function(direction, speed) { 
 /*配置參數*/
 if(direction!='x' && direction!='y'){throw new Error('OverTurn arguments error');}
 $.each(this, function(){
 var $this = $(this),
 $front = $this.find('.front'),
 $behind = $this.find('.behind'),
 dis = (direction=='x') ? $this.width() :$this.height(),
 s = Number(speed) || 80;/*默認速度80 建議不要超過100*/
 $this.mouseenter(function() {
 OverTurnAnimate($front, $behind, direction, dis, 'enter', s);
 }).mouseleave(function() {
 OverTurnAnimate($front, $behind, direction, dis, 'leave', s);
 });
 });
 };
})(jQuery);
/*插件引用方法y*/
$('.demo1').OverTurn('y',100);/*speed不填默認速度80 建議不要超過100*/
/*插件引用方法x*/
$('.demo2').OverTurn('x');
</script>
</body>
</html>

相關推薦:

CSS3實現動態翻牌效果

3D翻牌的10篇內容推薦

jQuery實現個性翻牌效果導航菜單的方法_jquery

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

jQuery實現撲克正反面翻牌效果實例分享

效果圖。代碼如下:<。=';x';&& direction,width: 0},speed.function() { $front.hide();$behind.show().animate({left: 0,width: dis},speed);});}else{ $front.animate({top: dis/2,height: 0},speed.function() { $front.hide();$behind.show().animate({top: 0,height: dis}。相關推薦。CSS3實現動態翻牌效果。3D翻牌的10篇內容推薦。jQuery實現個性翻牌效果導航菜單的方法_jquery。
推薦度:
標簽: 分享 實現 效果
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 咸阳市| 福海县| 大足县| 治县。| 湾仔区| 太谷县| 遂川县| 县级市| 若羌县| 高陵县| 佳木斯市| 巴彦县| 大荔县| 嘉禾县| 崇文区| 耒阳市| 蒙城县| 陕西省| 竹山县| 吉林市| 栖霞市| 南漳县| 平武县| 瑞丽市| 同仁县| 兰州市| 阜新| 邮箱| 阿瓦提县| 沿河| 孟连| 沧州市| 磴口县| 德惠市| 江安县| 武穴市| 沙洋县| 涿州市| 循化| 金华市| 新巴尔虎左旗|