0
我遇到了在网站上实施的悬停效果问题。该效果在桌面上运行良好。在移动设备上,图像全部正常显示,当我点击它们时,它们会将我带到正确的链接。但是当我按下浏览器时,我所看到的就是图像替代文字。有人可以建议吗?这是我现在的代码。对于类似的问题,我似乎无法在这里找到任何解决方案。谢谢当我单击手机屏幕上的返回按钮时,图像消失
$(document).ready(function() {
$('.img1')
.mouseover(function() {
$(this).attr("src", "https://cdn.shopify.com/s/files/1/1297/5789/t/3/assets/Easy_Motion_-_Electric_Bicycles_Two.jpg?6314974642385151026");
})
.mouseout(function() {
$(this).attr("src", "https://cdn.shopify.com/s/files/1/1297/5789/t/3/assets/Easy_Motion_-Electric_Bikes.jpg?10135819641956685452");
});
<div class='desktop-4 tablet-full mobile-full'><a href='/home'><img src="https://cdn.shopify.com/s/files/1/1297/5789/t/3/assets/Easy_Motion_-Electric_Bikes.jpg?10135819641956685452" alt="electric bikes by easy motion" class="img1"/></a></div>
感谢您的回复 - 我对jQuery没有经验,在这个函数中我需要什么代码? – user3578655