请问CSS如何设置鼠标悬停图片自动放大鼠标掠过图片自动恢复原样
请问CSS如何设置鼠标悬停图片自动放大鼠标掠过后图片自动恢复原样也就是说鼠标停顿在图片上图片自动放大到多少多少鼠标移动开图片图片自动恢复大小...
请问CSS如何设置鼠标悬停图片自动放大鼠标掠过后图片自动恢复原样
也就是说 鼠标停顿在图片上 图片自动放大到多少多少 鼠标移动开图片 图片自动恢复大小 展开
也就是说 鼠标停顿在图片上 图片自动放大到多少多少 鼠标移动开图片 图片自动恢复大小 展开
3个回答
展开全部
#demo{overflow:hidden;width:120px;text-align:center;padding:10px;}
#demo img{border:none;width:100px;height:100px;border:5px solid #f4f4f4}
#enlarge_images{position:absolute;display:none;z-index:2;border:5px solid #f4f4f4}
"> var demo = document.getElementById("demo"); var gg = demo.getElementsByTagName("img"); var ei = document.getElementById("enlarge_images"); for(i=0; i var ts = gg[i]; ts.onmousemove = function(event){ event = event || window.event; ei.style.display = "block"; ei.innerHTML = ''; ei.style.top = document.body.scrollTop + event.clientY + 10 + "px"; ei.style.left = document.body.scrollLeft + event.clientX + 10 + "px"; } ts.onmouseout = function(){ ei.innerHTML = ""; ei.style.display = "none"; } ts.onclick = function(){ window.open( this.src ); } }
"> var demo = document.getElementById("demo"); var gg = demo.getElementsByTagName("img"); var ei = document.getElementById("enlarge_images"); for(i=0; i var ts = gg[i]; ts.onmousemove = function(event){ event = event || window.event; ei.style.display = "block"; ei.innerHTML = ''; ei.style.top = document.body.scrollTop + event.clientY + 10 + "px"; ei.style.left = document.body.scrollLeft + event.clientX + 10 + "px"; } ts.onmouseout = function(){ ei.innerHTML = ""; ei.style.display = "none"; } ts.onclick = function(){ window.open( this.src ); } }
参考资料: www.imzm.com
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询