DOM event fired by window resize

后端 未结 5 2126
攒了一身酷
攒了一身酷 2021-02-10 04:34

I have a page that has a fairly complicated layout. When the page is initially opened there\'s a problem with the aligment of some of the elements. However, this problem can be

5条回答
  •  灰色年华
    2021-02-10 05:19

    I think you should investigate why the page does not render correctly in the first place. Relying on a re-render after resize sounds hackish to me.

    Although manually firing a resize event might not give the correct results, you can also try to hide/show an event triggering a re-render event. This might result in screen flickering, so it is not the optimal solution.

提交回复
热议问题