I have a header with a navigation menu inside. A couple of the menu links of the navigation menu are styled as buttons. For some reason the styling of the buttons only appears after the page loads up.
Screen recording: https://streamable.com/k5fhmh
Every time the page loads up the buttons do this "animation" and I can't figure out what's causing it.
What might be causing this?
I would like the style of the buttons to appear right away, with no animation or delay.
It seems that the style to the buttons are added by a process which is still loading after the page has loaded. But I had this by an intended css delay effect of a used module as well.
You may check:
imported
in a secondary stylesheet file.<a class='button stylingClass" href="...">Get Started</a>
) and not added afterwards i.e. by JS and/or by an external module.Additional Tipps for a workaround:
(A) If it is caused by a module (i.e. the module adds the additional stylings) and you however cannot change the module loading process you are able to add the style ADDITIONAL to your main css file or write it to a style part in your <head>
. That doubled code does not affect the working of your page.
Example:
<head>
<style>
a.buttonClass {
... your button css ...
}
</style>
</head>
(B) If it caused by a font you may like to have a look to this information:
https://www.freecodecamp.org/news/web-fonts-in-2018-f191a48367e8/
https://css-tricks.com/really-dislike-fout-font-display-optional-might-jam/