Setting global colors on links and transitions on their color:
a {
color: blue;
transition: color 300ms linear; }
Later in the code, there's more specific styling for links in the navigation:
nav a { color: red; }
nav a:hover { color: black; }
Here's the simple HTML structure:
<nav>
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul>
</nav>
Expected Behavior:
- Navigation links inherit color transition
- Hovering on navigation links smoothly changes their color
Issue: When the page loads in Chrome, links start with a default color or the global link color before transitioning to the correct color immediately.
This issue seems to be Chrome-specific. Attempted to replicate it on JSFiddle, but it didn't occur there.
Is there a way to prevent the transition from happening on page load?