From b795ce55a49c38986b75fa4edb45a1265c468aff Mon Sep 17 00:00:00 2001 From: LNischala Date: Thu, 10 Oct 2024 14:40:02 +0530 Subject: [PATCH] Improved hover effect of add to cart button --- style.css | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/style.css b/style.css index 58aedfd6..ab931906 100644 --- a/style.css +++ b/style.css @@ -351,18 +351,36 @@ button { padding: 12px 14px; } -button img { - width: 30px; +/* button img { + width: 18px; display: none; } button:hover img { display: block; +} */ + +#buy-btn img{ + width: 30px; + display: none; +} + +#buy-btn:hover img{ + display: block; +} + +#cart-btn img{ + width: 18px; + display: none; +} + +#cart-btn:hover img{ + display: block; } #cart-btn:hover { - width: 160px; + width: 140px; display: flex; align-items: center; justify-content: space-between; @@ -370,7 +388,7 @@ button:hover img { } #buy-btn:hover { - width: 160px; + width: 140px; display: flex; align-items: center; justify-content: space-between;