!DOCTYPE html
html
head
meta http-equiv=Content-Type content=text/html;charset=UTF-8 /
titledemo/title
script src=jquery-1.7.2.min.js type=text/javascript charset=utf-8/script
/head
style type=text/css
body{
margin:0;
padding:0;
}
div{
width:500px;
height:300px;
border:1px solid red;
overflow:hidden;
margin:0 auto;
}
img{
width:0;
height:0;
margin-left:250px;
margin-top:150px;
padding:0;
}
/style
script type=text/javascript charset=utf-8
$(document).ready(function(){
$('#img').animate({
width:200%,
height:200%,
marginLeft:-200px,
marginTop:-100px
},10000);
});
/script
body
div class=showimg id=showimg
img src=3.jpg id=img alt=Here is a pic /
/div
/body
/html
数值未经过计算,随便写的
取消
评论