We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Hover animation in the header.

Solved

Hover animation in the header.

CreatorTim
Navigator
471 1 71

Hey guys, I need help with a hover animation in the header.

 

I’d like a smooth sliding animation for the submenu. So, when I hover over the menu item "Products," the submenu should slide out smoothly every time.

 

I want the same animation as here when you hover over "store": https://tomnoske.store/

 

And here’s my store: https://1049xn-ya.myshopify.com/

 

Thanks for your help,
Tim

Accepted Solution (1)

ecoboostify
Shopify Partner
36 8 6

This is an accepted solution.

Hope this guide is helpful to you!

  1. Log in to Shopify > Online Store > Customize (https://prnt.sc/JqzLGYNkU1X0).
  2. Go to Theme Settings > Custom CSS (https://prnt.sc/pyPhZM5u885c).
  3. Copy the CSS code below, paste it into the Custom CSS box, and click Save.
header-menu details::details-content {
	display: block;
	block-size: 0;
	overflow: hidden;
	transition-property: block-size, content-visibility;
	transition-duration: 0.3s;
	transition-behavior: allow-discrete;
	transition-timing-function: ease-out;
}

header-menu details[open="true"]::details-content {
	block-size: auto;
	block-size: calc-size(auto, size);
}
It's truly fulfilling to help someone.
If this fixed your issue, Likes and Accept as Solution are highly appreciated.
EcoBoostify Shoppable Reel UGC - Easily Shoppable Videos+Reels, Inactive Tab Messages, Favicon Cart Counts, and more optimize store

View solution in original post

Replies 2 (2)

ecoboostify
Shopify Partner
36 8 6

This is an accepted solution.

Hope this guide is helpful to you!

  1. Log in to Shopify > Online Store > Customize (https://prnt.sc/JqzLGYNkU1X0).
  2. Go to Theme Settings > Custom CSS (https://prnt.sc/pyPhZM5u885c).
  3. Copy the CSS code below, paste it into the Custom CSS box, and click Save.
header-menu details::details-content {
	display: block;
	block-size: 0;
	overflow: hidden;
	transition-property: block-size, content-visibility;
	transition-duration: 0.3s;
	transition-behavior: allow-discrete;
	transition-timing-function: ease-out;
}

header-menu details[open="true"]::details-content {
	block-size: auto;
	block-size: calc-size(auto, size);
}
It's truly fulfilling to help someone.
If this fixed your issue, Likes and Accept as Solution are highly appreciated.
EcoBoostify Shoppable Reel UGC - Easily Shoppable Videos+Reels, Inactive Tab Messages, Favicon Cart Counts, and more optimize store
CreatorTim
Navigator
471 1 71

Thank you so much, I really appreciate it!