<html>
<head>
<title>test</title>
<style type="text/css">
#div1{position:absolute;left:30%;top:10%;}
#p1{margin:10 300}}
</style>
</head>
<body>
<div id="div1">
<img src="http://att2.citysbs.com/fz/bbs_attachments/2010/month_1002/10020312250ba11460cb93cf95.jpg" id="pic" style="transition:1s">
<p id="p1">picture</p>
</div>
<script>
var pic=document.getElementById("pic");
function bigger(){
pic.style.width="700px";
pic.style.height="700px";
}
window.onload=abt;
function abt(){
pic.onmouseover=bigger;
pic.onmouseout=function(){
pic.style.width="650px";
pic.style.height="650px";
}
}
</script>
</body>
</html>
添加回答
举报
0/150
提交
取消