search

Home  >  Q&A  >  body text

js changes div position, screen flashes

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>

零时差零时差1591 days ago1204

reply all(1)I'll reply

  • 梳中分的盲仔

    梳中分的盲仔2020-11-28 18:40:03

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

    reply
    0
  • Cancelreply