I've been attempting to implement a hover effect on my drop-down cart that makes it fade or slide up similar to submenus.
But, CSS transitions are not my forte! I've tried using generic fades with the transition property, but no luck.
Currently, my drop-down function simply involves displaying a second div upon hovering, which contains PHP functions to fetch the user's cart items and prices.
I'm starting to wonder if there might be a more effective approach to achieve this?
To see an example of the drop-down cart in action within the header of my website, visit: My Website with Cart
Here is a link to my code: https://jsfiddle.net/em2bvxvx/
Below is the CSS for the Cart Drop Down:
.mini-cart {background-color:red;background-repeat:no-repeat;background-size:22px 22px;width:22px;height:22px;font-size:10px;padding-top:6px;padding-left:7.4px;margin-top:13px;margin-left:14px;color:#000;}
.shopping-cart {position:relative;display:inline-block;}
.minicart-dropdown {width:300px;display:none;background-color:#fff;min-width:160px;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);z-index:1;right:0px;padding:20px;top:40px;}
.minicart-dropdown .size-woocommerce_thumbnail {height:auto;max-width:50px;}
.minicart-dropdown a {color:#fff;padding:12px 16px;text-decoration:none;display:block;}
.minicart-dropdown a:hover {background-color:#ddd}
.shopping-cart:hover .minicart-dropdown {display:block;}
.minicart-dropdown > .cart-buttons {display:flex;color:#fff;margin-top:20px;}
.minicart-dropdown > .cart-buttons > .minicart-vb, .minicart-co {width:49%;text-align:center;background-color:#01273a!important;cursor:pointer;}
.minicart-dropdown > .cart-buttons > .minicart-co {margin-left:15px;}
.minicart-dropdown .content {margin-top:20px;}