Home  >  Article  >  Web Front-end  >  A picture magnification effect that follows the mouse, compatible with FF_Image special effects

A picture magnification effect that follows the mouse, compatible with FF_Image special effects

WBOY
WBOYOriginal
2016-05-16 19:14:351399browse











<SCRIPT>         <br>function show(_this) { <br>    document.getElementById("enlarge_images").innerHTML = "<img src='"   _this.src   "' >"; <br>} <br>function hide(_this) { <br>    document.getElementById("enlarge_images").innerHTML = ""; <br>} <br>function move_layer(event){ <br>    event = event || window.event; <br>    enlarge_images.style.left=event.clientX document.body.scrollLeft 10; <br>    enlarge_images.style.top=event.clientY document.body.scrollTop 10; <br>} <br>document.onmousemove =move_layer; <br></SCRIPT>


[Ctrl A 全选 注:如需引入外部Js需刷新才能执行
]<script> function show(_this) { document.getElementById("enlarge_images").innerHTML = "<img src='" + _this.src + "' alt="A picture magnification effect that follows the mouse, compatible with FF_Image special effects" >"; } function hide(_this) { document.getElementById("enlarge_images").innerHTML = ""; } function move_layer(event){ event = event || window.event; enlarge_images.style.left=event.clientX+document.body.scrollLeft+10; enlarge_images.style.top=event.clientY+document.body.scrollTop+10; } document.onmousemove =move_layer; </script>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Web page background gradient effect code_page backgroundNext article:Web page background gradient effect code_page background

Related articles

See more