Shopify themes, liquid, logos, and UX
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
Hey guys,
I want to change the hover effect for the products.
Currently, I have the default Shopify animation. I’d like to change it to a quick slide to the left.
The second thing I want is that when I hover over a product, a shopping bag icon with "Quick Buy" appears in a circle at the bottom-right corner.
I want everything to look exactly like it does here: https://tomnoske.store/collections/all-products
And here’s my store URL: https://1049xn-ya.myshopify.com/collections/all
Thanks so much,
Tim
@CreatorTim ,
I am from Mageplaza - Shopify solution expert.
To change the hover effect for product items in your Shopify store, you'll need to modify the CSS in your theme. Here are some suggestions you can follow to achieve that:
2. Add Custom CSS:
3. Here is an example:
<div class="product-card">
<div class="product-card__image-wrapper">
<img src="main-image.jpg" alt="Product Image" class="product-card__image">
<img src="hover-image.jpg" alt="Hover Image" class="product-card__hover-image">
</div>
<div class="product-card__details">
<h3 class="product-card__title">Product Name</h3>
<p class="product-card__price">$49.99</p>
<button class="product-card__cart-button">Add to Cart</button>
</div>
</div>
/* General Styles */
.product-card {
position: relative;
overflow: hidden;
border: 1px solid #eaeaea;
padding: 15px;
text-align: center;
transition: transform 0.3s ease;
}
.product-card:hover {
transform: scale(1.05);
}
/* Image Wrapper */
.product-card__image-wrapper {
position: relative;
width: 100%;
height: 200px; /* Adjust based on your design */
overflow: hidden;
}
.product-card__image {
width: 100%;
height: 100%;
object-fit: cover;
transition: opacity 0.3s ease;
}
.product-card__hover-image {
position: absolute;
top: 0;
right: -100%;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}
.product-card:hover .product-card__hover-image {
transform: translateX(-100%);
}
/* Details Section */
.product-card__details {
position: relative;
padding: 10px 0;
}
/* Cart Button */
.product-card__cart-button {
position: absolute;
bottom: 15px;
right: 15px;
background-color: #000;
color: #fff;
border: none;
padding: 10px 15px;
font-size: 14px;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.product-card:hover .product-card__cart-button {
opacity: 1;
visibility: visible;
4. Save and test:
I hope this helps, please leave a comment if you need further instructions !
Mageplaza | Top-Rated Shopify Agency | Trusted by 230,000+ worldwide merchants
If our suggestion works for you, please give it a Like or mark it as a Solution!
Should you have any questions or concerns, feel free to contact us via consultant@mageplaza.com
Hey, thanks for the feedback!
However, all I did was add the CSS to the base.css file, but nothing changed. What should I do with the HTML? Should I add it somewhere or make any changes?
Thank again,
Tim