Generatepress add Menu Hover Animation.


Here is a tutorial on how to add Menu Hover Animation to the Generatepress Theme.





Simply add the following code into your theme style.css or custom css through the admin panel located in the following location, Dashboard/Appearance/Custom CSS





@media (min-width: 769px) {
.main-navigation .menu > .menu-item > a::after {
content: "";
position: absolute;
right: 0;
left: 50%;
bottom: 15px;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);

display: block;
width: 0;
height: 2px;

background-color: currentColor;
transition: 0.3s width ease;
}
.main-navigation .menu > .menu-item.current-menu-item > a::after,
.main-navigation .menu > .menu-item.current-menu-ancestor > a::after,
.main-navigation .menu > .menu-item > a:hover::after {
width: 50%;
}
}





https://docs.generatepress.com/article/adding-menu-hover-animation/

Comments

Popular Posts