网络编程 
首页 > 网络编程 > 浏览文章

jQuery实现移动端下拉展现新的内容回弹动画

(编辑:jimmy 日期: 2024/5/9 浏览:3 次 )

jQuery移动端下拉展现新的内容动画回弹,供大家参考,具体内容如下

jquery的方法,写的比较细,可以改成原生的这里就不做修改了, 话不多说上代码, 也可以改成下拉刷新

<!DOCTYPE html>
<html>
 <head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
 <title>顶部回弹</title>
 <style type="text/css">
 html,body,div,h2{ margin: 0;padding: 0;}
 html,body { width: 100%;height: 100%;overflow: hidden; }
 .wrap { width: 100%;height: 100%;overflow: hidden;position: relative; }
 .hideBox { width: 100%;height: 100%;background-color: #f5f5f5;position: absolute;top: 0;left: 0;overflow-y: auto;}
 .hideBox h2 { width: 100%;margin-top: 20%;font-size: 16px;text-align: center; }
 
 .top { width: 100%;height: 100%; position: absolute; top: 0;left: 0;z-index: 2;background-color: #fff;overflow-y: auto;text-align: center;}
 .moveBox {background-color: #1a84dd;color: #fff;width: 100px;height: 100px;text-align: center;line-height: 100px;border-radius: 50%;cursor: pointer; -webkit-user-select: none;-moz-user-select: none;margin: 0 auto;}
 .moveIn { transition: all 1s ease-in; }
 </style>
 </head>
 <body>
 <div class="wrap" >
 <div class="hideBox" >
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2> 
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 <h2>这是隐藏层的内容</h2>
 </div>
 <div class="top" >
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 <div class="moveBox" >移动块</div>
 </div>
 </div>
 </body>
 <script src="/UploadFiles/2021-04-02/jquery.min.js">

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

上一篇:jQuery实时统计输入框字数及限制
下一篇:JS forEach跳出循环2种实现方法
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网