A user wants to create a transparent header effect on their Shopify Dawn theme website that changes opacity on scroll.
Initial Solution Provided:
Enable Dawn’s built-in sticky header via theme customizer
Add custom CSS snippet to reduce header opacity to 0.7 when scrolled, returning to full opacity on hover
Implementation involves creating a new snippet file and rendering it in the theme layout
Additional Requirements:
User requested the header be transparent specifically on the homepage landing page, allowing background images to show through
Solution updated with conditional code using {% if template == 'index' %} to apply transparent styling only to the homepage
Sets header position to fixed with transparent background and white text
Current Status:
User is requesting a final modification: they want the header to remain transparent at the top of the homepage but return to full opacity when hovering over it (similar to the Off-White website example). This question remains unanswered with the user asking multiple times for guidance on implementing this hover behavior.
Summarized with AI on October 25.
AI used: claude-sonnet-4-5-20250929.
If I wanted to have my website header opacity decrease as I scroll for my website that currently uses the Dawn theme, I assume I would require some custom code. Does anyone know how to do this? I want the header to be a solid white, and then when you scroll down, the opacity decreases and it becomes transparent.
You should now be able to add the sticky header settings as you desire. For adding transparency, let’s add some simple styling to the theme. From the Theme Customizer, let’s go to the Code Editor as directed:
Let’s create a new snippet to add these modifications. We suggest using a snippet so you can easily add or remove it as needed. The screenshot below shows how to create a new snippet:
And we’re done! Make sure to save these changes. Once saved, let’s go to the storefront. It should now behave something like so:
If my response helped you, please consider giving it a like ( ) and marking it as an accepted solution if it resolved your issue. Your feedback helps other community members with similar questions.
Let’s go back to the snippet we previously created. To ensure that the header is transparent on the home page, update the contents of the file to the snippet given below:
This is great! Thank you so much. I love the way it looks at the top of the page, but when I hover over it, I would like it to go back to full opacity. Similar to this website. Thoughts on how to do this?
Is there a way to do this so when I later hover over the header, it comes back to full opacity? So it is only transparent when I am not hovering over it and at the top of the page. Just like this website.