js changes div position, screen flashes
零时差
零时差 2020-07-27 16:40:52
0
1
1216

Initially, a certain div is on the x=0 y=0 axis. After the page is loaded, js changes the div to the x=50 y=50 axis. How to prevent the page from flickering when refreshing.

You can take a look at the ***.z***** page and see how to prevent it from flashing every time it is refreshed.

##<script> window.onresize = window.onload = function(){ let hei = $(document.body).height(); let x = (hei-100- $('.zvn-min').height())/2;         if(x<0){             x=0         }                              '.zvn-min').css('margin-bottom','30px') }</script>

零时差
零时差

reply all(1)
梳中分的盲仔

The latest learning juice for the front end can be sent by mail

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template