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

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題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關(guān)鍵字專題關(guān)鍵字專題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
當(dāng)前位置: 首頁 - 科技 - 知識百科 - 正文

如何實(shí)現(xiàn)卡片翻閱效果

來源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-27 20:11:51
文檔

如何實(shí)現(xiàn)卡片翻閱效果

如何實(shí)現(xiàn)卡片翻閱效果:效果如下:拖動翻閱卡片,或點(diǎn)擊下一張翻閱卡片效果<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width
推薦度:
導(dǎo)讀如何實(shí)現(xiàn)卡片翻閱效果:效果如下:拖動翻閱卡片,或點(diǎn)擊下一張翻閱卡片效果<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width
效果如下:拖動翻閱卡片,或點(diǎn)擊‘下一張’翻閱卡片效果

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=640, user-scalable=0">
 <title>Document</title>
 <style>
 .containt{position:absolute; top:0; bottom:0; left:0; right:0; overflow:hidden;}
 ul,li{margin:0; padding:0;}
 ul{position:absolute; left:100px; right:100px; top:150px; bottom:200px;}
 ul>li{list-style:none; display:none; position:absolute; top:0; left:0; width:100%; height:100%; border-radius: 15px; overflow:hidden; box-shadow:0 20px 40px rgba(0,0,0,0.1); background:#f6f6f6; transition:.3s; -webkit-transition:.3s; cursor:pointer;}
 ul>li img{width:100%;}
 ul>li:nth-child(1){display: block; z-index:2;}
 ul>li:nth-child(2){display: block; transform:matrix(0.95,0,0,1,0,-20); -webkit-transform:matrix(0.95,0,0,1,0,-20); z-index: 1;}
 ul>li:nth-child(3){display: block; transform:matrix(0.9,0,0,1,0,-40); -webkit-transform:matrix(0.9,0,0,1,0,-40); z-index: 0;}
 ul>li>.content{height:100%; width: 100%;}
 ul>li:nth-child(2)>.content{opacity:0.9;}
 ul>li:nth-child(3)>.content{opacity:0.8;}
 .footer{position: absolute; display:flex; display:-webkit-flex; bottom:0; left:0; right:0; height:150px; -webkit-align-items:center; -webkit-justify-content:center; text-align: center;}
 .footer .button{width:80px; height:80px; line-height: 80px; background:#000; border-radius: 50%; color:#fff;}
 </style>
</head>
<body>
 <p>
 <ul>
 <li>
 <p background-image="">
 <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000002J4UUk29y8BY.jpg">
 </p>
 </li>
 <li>
 <p>
 <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M0000025NhlN2yWrP4.jpg">
 </p>
 </li>
 <li>
 <p>
 <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000004AlfUb0cVkN1.jpg">
 </p>
 </li>
 <li>
 <p>
 <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000003Nz2So3XXYek.jpg">
 </p>
 </li>
 <li>
 <p>
 <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000001BLpXF2DyJe2.jpg">
 </p>
 </li>
 <li>
 <p background-image="">
 <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000002J4UUk29y8BY.jpg">
 </p>
 </li>
 </ul>
 <p>
 <p>下一張</p>
 </p>
 </p> 
 <script src="../js/jquery-3.2.0.min.js"></script>
 <script>
 window.onload = function(){
 var pos = {};
 var distance_pos = {};
 var transition;
 var touchStart = function(e){
 var event = e ? e : window.event;
 var touch = event.touches[0];
 var target = event.target || event.srcElement;
 transition = target.style.transition;
 pos = {
 x: touch.pageX,
 y: touch.pageY
 }
 this.addEventListener('touchmove', touchMove, false);
 this.addEventListener('touchend', touchEnd, false);
 }
 var touchMove = function(e){
 var event = e ? e : window.event;
 var touch = event.touches[0];
 if($("li").length<2){
 alert("已經(jīng)是最后一張了");
 this.removeEventListener('touchstart', touchStart, false);
 this.removeEventListener('touchmove', touchMove, false);
 this.removeEventListener('touchend', touchEnd, false);
 return false;
 }
 distance_pos = {
 x: touch.pageX - pos.x,
 y: touch.pageY - pos.y
 }
 this.style.transition = 'none';
 this.style.webkitTransition = 'none';
 this.style.left = `${distance_pos.x}px`;
 this.style.top = `${distance_pos.y}px`;
 }
 var touchEnd = function(e){
 var event = e ? e : window.event;
 this.style.transition = transition;
 this.style.webkitTransition = transition;
 if(Math.abs(distance_pos.x) > Math.abs(distance_pos.y)){
 //水平滑動
 if(distance_pos.x < -50){
 // 向左滑出
 this.style.left = '-640px';
 removeTouchEvent(this)
 }else if (distance_pos.x > 50) {
 // 向右滑出
 this.style.left = '640px';
 removeTouchEvent(this)
 }else{
 this.style.top = '0px';
 this.style.left = '0px';
 }
 }else{
 //垂直滑動
 if(distance_pos.y < -50){
 // 向上滑出
 this.style.top = '-150%';
 removeTouchEvent(this)
 }else if (distance_pos.y > 50) {
 // 向下滑出
 this.style.top = '150%';
 removeTouchEvent(this)
 }else{
 this.style.top = '0px';
 this.style.left = '0px';
 }
 }
 this.removeEventListener('touchmove', touchMove, false);
 this.removeEventListener('touchend', touchEnd, false);
 }
 var listenTouchEvent = function(){
 $("li")[0].addEventListener('touchstart',touchStart,false)
 }
 var removeTouchEvent = function(el){
 setTimeout(function(){
 $(el).remove();
 listenTouchEvent()
 },300)
 }
 listenTouchEvent()
 $(".button").click(function(){
 var element = $("li")[0];
 if($("li").length<2){
 return;
 }
 element.style.transform = 'translate(640px,0px)';
 removeTouchEvent(element);
 })
 }
 </script>
</body>
</html>

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

如何實(shí)現(xiàn)卡片翻閱效果

如何實(shí)現(xiàn)卡片翻閱效果:效果如下:拖動翻閱卡片,或點(diǎn)擊下一張翻閱卡片效果<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width
推薦度:
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 开江县| 武川县| 车致| 安图县| 崇阳县| 万盛区| 东源县| 博白县| 南雄市| 黄梅县| 兴化市| 正镶白旗| 中超| 安岳县| 西充县| 沙坪坝区| 江达县| 宜君县| 仙桃市| 常州市| 北川| 互助| 邛崃市| 义乌市| 铜川市| 大安市| 云南省| 高密市| 河间市| 资源县| 盖州市| 芦山县| 嘉义市| 济南市| 固安县| 永修县| 盈江县| 三门县| 晴隆县| 繁峙县| 六安市|