tkennedy7 Posted January 13, 2022 Share Posted January 13, 2022 Site URL: http://empiricalwisdom.com Hello! I am currently using the dynamic style sticky header and some CSS I found to customize the navbar on scroll for certain pages on my site. When first loaded, the navbar is transparent with white text. Then on scroll, the navbar gets a solid white background, and the site title + navigation links change to black. However, the color of the site title and nav links seems to change to black faster than the white background appears, which looks quite clunky. Does anyone how I can achieve a matching transition animation for both the white background and the changing text color so that it looks smoother? Would really appreciate any help 🙂 Here's the CSS I'm currently using: <style> .tweak-fixed-header .shrink.header { background: #FFF !important; } .tweak-fixed-header .shrink.header .header-nav-wrapper a { color: #000 !important; } .tweak-fixed-header .shrink.header #site-title { color: #000 !important; } #header.shrink .burger-inner>div { background-color: black !important; } </style> Link to comment
tkennedy7 Posted January 13, 2022 Author Share Posted January 13, 2022 Leaving this up in case anybody else has this same problem. I fixed it by adding this code to each of the changes above: transition: .3s ease-out; For example: .tweak-fixed-header .shrink.header { background: #FFF !important; transition: .3s ease-out; } Hope this helps 🙂 tuanphan and MayaViolet 2 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment