//移入显示大图
moveover = record => {
var boximg = document.createElement(‘img’);
boximg.style.width = ‘150px’;
boximg.style.height = ‘150px’;
boximg.style.position = ‘absolute’;
boximg.style.left = ‘70px’;
boximg.style.top = ‘-30px’;
boximg.src = record.url;
boximg.id = ‘img_big’ + record.id;
var img_small = document.getElementById(‘img_small’ + record.id)
img_small.parentNode.appendChild(boximg)
};
//移出移除大图
moverout = record => {
var img = document.getElementById(‘img_big’ + record.id);
img.parentNode.removeChild(img);
};
鼠标移入生成放大图片,移出销毁图片
最新推荐文章于 2022-04-13 12:00:07 发布