1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen">
<script type="text/javascript">
function souris(s){
dde=(navigator.vendor) ? document.body : document.documentElement;
setX =s.clientX + dde.scrollLeft;
setY =s.clientY + dde.scrollTop;
}
navigator.appName.substring(0,3)=="Net" ? document.addEventListener("mousemove", souris, false) : document.attachEvent('onmousemove',function(){souris(event)});
function sensa(){
var clic=document.getElementById('clic')
var igmp=document.getElementById('igmp')
document.getElementById('igmg').style.left=-((setX-igmp.offsetLeft)*4)+(clic.offsetWidth/2)+'px'
document.getElementById('igmg').style.top=-((setY-igmp.offsetTop)*4)+(clic.offsetHeight/2)+'px'
}
</script>
</head>
<body>
<img src="grenouille.jpg" style='width:125px;position:absolute;top:200px;left:400px'id="igmp" onmousemove='sensa()'>
<br><br><br><br><br><br>
<div id="clic" style='overflow:hidden;height:200px;width:200px'>
<img src="grenouille.jpg" style='position:relative;' id="igmg">
</div>
</body>
</html> |