123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>长列表滚动</title>
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
- <meta name="description" content="">
- <meta name="keywords" content="">
- <link href="" rel="stylesheet">
- <style>
- * {
- margin: 0;
- padding: 0;
- }
- .page li {
- height: 50px;
- padding: 0 10px;
- /*background: #f2f2f2;*/
- }
- .bgyuan {
- animation: action 4s linear infinite;
- animation-direction: alternate;
- /*轮流反向播放动画。*/
- animation-timing-function: ease-in-out;
- /*动画的速度曲线*/
- }
- /* .hongbao {
- animation: zy 1.5s .15s linear infinite;
- -moz-animation: zy 1.5s .15s linear infinite;
-
- -webkit-animation: zy 1.5s .15s linear infinite;
- -o-animation: zy 1.5s .15s linear infinite;
- } */
- .jinbi {
- animation: wy 1.5s .15s linear;
- -moz-animation: wy 1.5s .15s linear;
- /* Firefox */
- -webkit-animation: wy 1.5s .15s linear;
- /* Safari and Chrome */
- -o-animation: wy 1.5s .15s linear;
- /* Opera */
- }
- @keyframes wy {
- 0% {
- transform: translate(0, 0);
- }
- /* 50% {
- transform: translate(100px,-100PX);
- } */
- 100% {
- transform: translate(0, 200PX);
- }
- }
- @-o-keyframes wy {
- 0% {
- transform: translate(0, 0);
- }
- 100% {
- transform: translate(0, 200PX);
- }
- }
- @-moz-keyframes wy {
- 0% {
- transform: translate(0, 0);
- }
- 100% {
- transform: translate(0, 200PX);
- }
- }
- @-webkit-keyframes wy {
- 0% {
- transform: translate(0, 0);
- }
- 100% {
- transform: translate(0, 200PX);
- }
- }
- @-webkit-keyframes action {
- 0% {
- transform: rotate(0deg) scale(1);
- }
- 50% {
- transform: rotate(360deg) scale(1.4);
- }
- 100% {
- transform: rotate(0deg) scale(1);
- }
- }
- @-moz-keyframes action {
- 0% {
- transform: rotate(0deg) scale(1);
- }
- 50% {
- transform: rotate(360deg) scale(1.4);
- }
- 100% {
- transform: rotate(0deg) scale(1);
- }
- }
- @-o-keyframes action {
- 0% {
- transform: rotate(0deg) scale(1);
- }
- 50% {
- transform: rotate(360deg) scale(1.4);
- }
- 100% {
- transform: rotate(0deg) scale(1);
- }
- }
- @keyframes action {
- 0% {
- transform: rotate(0deg) scale(1);
- }
- 50% {
- transform: rotate(360deg) scale(1.4);
- }
- 100% {
- transform: rotate(0deg) scale(1);
- }
- }
- @-webkit-keyframes zy {
- 10% {
- transform: rotate(15deg);
- }
- 20% {
- transform: rotate(-10deg);
- }
- 30% {
- transform: rotate(5deg);
- }
- 40% {
- transform: rotate(-5deg);
- }
- 50%,
- 100% {
- transform: rotate(0deg);
- }
- }
- @-moz-keyframes zy {
- 10% {
- transform: rotate(15deg);
- }
- 20% {
- transform: rotate(-10deg);
- }
- 30% {
- transform: rotate(5deg);
- }
- 40% {
- transform: rotate(-5deg);
- }
- 50%,
- 100% {
- transform: rotate(0deg);
- }
- }
- @-o-keyframes zy {
- 10% {
- transform: rotate(15deg);
- }
- 20% {
- transform: rotate(-10deg);
- }
- 30% {
- transform: rotate(5deg);
- }
- 40% {
- transform: rotate(-5deg);
- }
- 50%,
- 100% {
- transform: rotate(0deg);
- }
- }
- @keyframes zy {
- 10% {
- transform: rotate(15deg);
- }
- 20% {
- transform: rotate(-10deg);
- }
- 30% {
- transform: rotate(5deg);
- }
- 40% {
- transform: rotate(-5deg);
- }
- 50%,
- 100% {
- transform: rotate(0deg);
- }
- }
- .circle_process {
- position: fixed;
- width: 50px;
- height: 50px;
- top: 220px;
- }
- .circle_process .wrapper {
- width: 25px;
- height: 50px;
- position: absolute;
- top: 0;
- overflow: hidden;
- }
- .circle_process .right {
- right: 0;
- }
- .circle_process .left {
- left: 0;
- }
- .circle_process .circle {
- width: 40px;
- height: 40px;
- border: 5px solid white;
- border-radius: 50%;
- position: absolute;
- top: 0;
- transform: rotate(-135deg);
- }
- .circle_process .rightcircle {
- border-top: 5px solid yellow;
- border-right: 5px solid yellow;
- right: 0;
- -webkit-animation: circle_right 10s linear infinite;
- animation-iteration-count: 1;
- animation-fill-mode: forwards;
- -webkit-animation-iteration-count: 1;
- -webkit-animation-fill-mode: forwards;
- }
- .circle_process .leftcircle {
- border-bottom: 5px solid yellow;
- border-left: 5px solid yellow;
- left: 0;
- -webkit-animation: circle_left 10s linear infinite;
- animation-iteration-count: 1;
- animation-fill-mode: forwards;
- -webkit-animation-iteration-count: 1;
- -webkit-animation-fill-mode: forwards;
- }
- @-webkit-keyframes circle_right {
- 0% {
- -webkit-transform: rotate(-135deg);
- }
- 50%,
- 100% {
- -webkit-transform: rotate(45deg);
- }
- }
- @-webkit-keyframes circle_left {
- 0%,
- 50% {
- -webkit-transform: rotate(-135deg);
- }
- 100% {
- -webkit-transform: rotate(45deg);
- }
- }
- </style>
- </head>
- <body>
- <div class="circle_process">
- <div class="wrapper right">
- <div class="circle rightcircle"></div>
- </div>
- <div class="wrapper left">
- <div class="circle leftcircle" id="leftcircle"></div>
- </div>
- <img src="./video/jinbi.png" style="position:absolute;top:15%;left:15%;width:70%;" alt="" class="hongbao">
- </div>
- <div id="list" style="padding-bottom:58px">
- <img src="./video/top.png" style="width:100%;position:fixed;top:0;z-index:1" alt="">
- <img src="./video/content.png" style="width:100%" alt="">
- <!-- <img src="./video/hongbao.png" style="width:80px;position:fixed;top:100px;left:10px;z-index:2" alt=""
- class="hongbao"> -->
- <img src="./video/gif.gif" alt="" style="width:100%;position:fixed;top:0px;z-index: 3;left:0;display: none"
- id="gifShow">
- </div>
- <!-- <img src="./video/jinbi.png" style="width:50px;position:fixed;left:20px;top:-100px;z-index:2;" alt="" id="fly"> -->
- <!-- class="jinbi" -->
- <div style="width:100%;min-height:60px;position:fixed;bottom:-4px;z-index:10">
- <div style="width:40%;height:100%;position:absolute;right:0;z-index: 10;" id="xiazai"></div>
- <img src="./video/3.png" style="width:100%;height:100%" alt="">
- </div>
- <div style="position: fixed;bottom:40px;left:50%;margin-left:-150px;z-index:1;display: none" id="show">
- <div>
- <img src="./video/btn.png" style="width:100px;position: absolute;
- top: 100px;
- left: 100px;z-index: 30;" alt="" id="tiaozhuan">
- <img src="./video/btnbg.png" style="width:300px;" alt="" class="bgyuan">
- </div>
- </div>
- <script src="https://sf3-ttcdn-tos.pstatp.com/obj/union-fe-nc/playable/sdk/playable-sdk.js"></script>
- <script type="text/javascript" src="./jquery.min.js"></script>
- <script type="text/javascript">
- // setTimeout(function(){
- // $(".hongbao").attr('src','./video/lingqu.png')
- // },10000)
- $('#xiazai').on('touchstart', function (e) {
- e.preventDefault()
- // e.stopPropagation()
- window.playableSDK.openAppStore()
- window.playableSDK.sendEvent('clickDownloadBar', {
- section: 'section1',
- area: 'area2'
- });
- })
- $('#tiaozhuan').on('touchstart', function (e) {
- e.preventDefault()
- // e.stopPropagation()
- window.playableSDK.openAppStore()
- window.playableSDK.sendEvent('clickDownloadBar', {
- section: 'section2',
- area: 'area3'
- });
- })
- $('.hongbao').on('touchstart', function (e) {
- e.preventDefault()
- // e.stopPropagation()
- window.playableSDK.openAppStore()
- window.playableSDK.sendEvent('clickDownloadBar', {
- section: 'section3',
- area: 'area4'
- });
- })
- var PAGE = 1; //初始化页数
- var PAGESIZE = 15; //每页展示几条数据
- var $list = $('#list'); //列表
- var preRemoveArray = []; //被移除的当前页面之前的页面
- var nextRemoveArray = []; //被移除的当前页面后面的页面
- var init = function () {
- // initPage();
- initEvent();
- };
- var a = 0
- var show = true
- var initEvent = function () {
- var $page;
- var length;
- window.onscroll = function () {
- if (show) {
- if (getScrollTop() > getScrollTop3() - 100 && getScrollTop() < getScrollTop3() + 100) {
- show = false
- $('#gifShow').show()
- setTimeout(function () {
- $('#gifShow').hide()
- }, 2000)
- }
- }
- if (isBottom()) {
- $("#show").show();
- $('#fly').addClass('jinbi')
- }
- };
- };
- var isBottom = function () {
- return getScrollTop() + window.screen.height >= document.body.clientHeight - 100;
- };
- var isTop = function () {
- return getScrollTop() === 0;
- };
- function getScrollTop() {
- return document.documentElement.scrollTop || document.body.scrollTop;
- }
- function getScrollTop3() {
- return window.innerHeight
- }
- init();
- </script>
- </body>
- </html>
|