johnpoint

johnpoint

(。・∀・)ノ゙嗨
github

Fixing lag in full-screen background image

After replacing the theme (the one I'm currently using), I noticed that the homepage was very laggy when scrolling. However, there was no frame drop when scrolling in sections without a background image, so I concluded that the issue was related to the background image.

After removing the "fixed" attribute, the lag disappeared. This led me to believe that this attribute was causing performance issues when scrolling through the blog.

I found an article Fixed background image performance issue and followed the instructions to set the background as a pseudo-element. This prevented frequent repainting of the background during scrolling, thus resolving the frame drop issue. Finally, after half a year of procrastination, my blog's homepage is smooth again...

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.