我将 *image_tag* 图像放在 *link_to* 元素中,并尝试进行鼠标悬停图像交换。除了没有抓取备用图像的鼠标悬停外,一切正常。在更一般的说明中,我是否正确地制作了超链接图像?抱歉,Rails 新手。非常感激!
<%= link_to (image_tag("#{product.prod_img}.jpg", alt: product.prod_name, class: 'img_prod_thumb', mouseover: "#{product.prod_img}_over.jpg")), "/products/#{product.id}" %>