CSS Performance Question

后端 未结 8 2032
挽巷
挽巷 2020-12-18 06:51

I was wondering what the experts do when it comes to writing CSS code. Is it bad to use the tagname.className style? Does inheritance cause a noticeable performance loss? Do

8条回答
  •  再見小時候
    2020-12-18 07:10

    CSS won't lead to sluggish scrolling. What might, though, is fixed backgrounds (via background-attachment: fixed). In my experience, I've noticed that those tend to slow down the browser when scrolling, so that's the most likely thing. If you don't use any of those, then just check to make sure you aren't using enormous background images.

提交回复
热议问题