dreamweaver里一张图片怎么做鼠标经过出现大图? 20
我有张人物图,我怎么样用鼠标经过这些人物的时候能出现大点的这个人物的其他图片。求帮助啊!!在线等啊...
我有张人物图,我怎么样用鼠标经过这些人物的时候能出现大点的这个人物的其他图片。求帮助啊!!在线等啊
展开
2个回答
展开全部
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>鼠标经过图片变大</title>
<script type="text/JavaScript">
function hidetrail(){
document.getElementById("preview_div").style.display= "none";
}
function showtrail(img1){
document.getElementById("preview_div").innerHTML="<img src="+img1+" width=400 height=300>";
document.getElementById("preview_div").style.display= "block";
}
function document.onmousemove(){
var a = document.body.scrollTop;
var b = document.body.scrollLeft;
var x = window.event.x;
var y = window.event.y;
document.getElementById("preview_div").style.top=a+y-150;
document.getElementById("preview_div").style.left=b+x;
}
</script>
</head>
<body>
<DIV id=preview_div style="DISPLAY: none; Z-INDEX: 50; POSITION: absolute;border:1 gray solid;filter: progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3);"></DIV>
<img src=‘shangchuanFiles/2010821175127176.jpg' border=0 width=120 height=90 align=left onMouseOver="showtrail('/shangchuanFiles/2010821175127176.jpg')" onmouseout=hidetrail()></a>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>鼠标经过图片变大</title>
<script type="text/JavaScript">
function hidetrail(){
document.getElementById("preview_div").style.display= "none";
}
function showtrail(img1){
document.getElementById("preview_div").innerHTML="<img src="+img1+" width=400 height=300>";
document.getElementById("preview_div").style.display= "block";
}
function document.onmousemove(){
var a = document.body.scrollTop;
var b = document.body.scrollLeft;
var x = window.event.x;
var y = window.event.y;
document.getElementById("preview_div").style.top=a+y-150;
document.getElementById("preview_div").style.left=b+x;
}
</script>
</head>
<body>
<DIV id=preview_div style="DISPLAY: none; Z-INDEX: 50; POSITION: absolute;border:1 gray solid;filter: progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3);"></DIV>
<img src=‘shangchuanFiles/2010821175127176.jpg' border=0 width=120 height=90 align=left onMouseOver="showtrail('/shangchuanFiles/2010821175127176.jpg')" onmouseout=hidetrail()></a>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询