试图有“添加到购物车”按钮作为悬停时,鼠标经过该产品。目前它是这样的盒子下面的每个产品。这是一个简单的解决方案,还是我需要在Shopify后端进行更复杂的编码?
wtlkbnrh1#
function main(){ document.getElementById('cart').style.color = 'white'; document.getElementById('cart').style.background-color = 'black'; document.getElementById('cart').style.translateY = '-50%'; document.getElementById('item').style.opacity = '24%'; document.getElementById('cart').style.opacity = '100%'; }
<div class = "item" onmouseover=main()> <!--image,etc.. give cart's id as cart give item's id as item --> </div>
1条答案
按热度按时间wtlkbnrh1#