Home  >  Article  >  Web Front-end  >  How to Prevent CSS Transitions from Triggering on Page Load in Google Chrome?

How to Prevent CSS Transitions from Triggering on Page Load in Google Chrome?

Patricia Arquette
Patricia ArquetteOriginal
2024-11-01 13:59:02981browse

How to Prevent CSS Transitions from Triggering on Page Load in Google Chrome?

Preventing CSS Transitions from Triggering on Page Load

Many web developers have encountered an issue where CSS transitions trigger during page load, causing elements to flash before reaching their final state. This behavior is particularly noticeable when applying color transitions, as the element initially flickers to black before transitioning to its intended color.

This issue stems from a bug in Google Chrome that triggers transitions whenever a page contains a

element. While there are various solutions to this problem, one simple recommendation is to add an empty