metafizzy / isotope

:revolving_hearts: Filter & sort magical layouts
https://isotope.metafizzy.co
11.05k stars 1.41k forks source link

你们怎么解决的页面闪烁的问题?How do you solve the page flicker problem? #1651

Open lovelyJason opened 1 year ago

lovelyJason commented 1 year ago
$('.grid').isotope({
  itemSelector: '.grid-item',
  layoutMode: 'masonry',
  masonry: {
    gutter: 20
  }
})

想问下你们怎么解决的当页面加载完成以后, 会闪烁的问题。即html初次渲染完成,然后又经过isotope的dom操作,让dom元素的位置发生了变化,造成页面闪烁,有点丑。

I would like to know how you solved the problem of flickering when the page was loaded, that is, when the html was rendered for the first time and the dom operation of the isotope changed the position of the dom element, causing the page to flicker.As shown in the figure

a

Test case: https://qdovo.com/talking/