<span style="font-size:18px;"><strong><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
#button02 {
position: absolute;
}
</style>
</head>
<body>
<input type="button" id="button01" name="button01" value="点击" />
<img id="button02" src="bootstrap/img/5.jpg" width="20%" height="20%" />
<!--embed :多媒体标签的使用!-->
<embed src="bootstrap/img/1 月 1 日 0点02分.mp3"></embed>
<script src="js/jquery.min.js"></script>
</body>
<script>
<!-- 编写脚本 -->
/*animate: 使得图片运动!*/
$(document).ready(function() {
var button01 = $("#button01");
button01.click(function() {
/*运动到距离左边的距离!*/
$("#button02").animate({
"left": "1200px"
}, 2000);
});
<pre name="code" class="html"> //等比例放大缩小相片!
$("#button02").click(function(){
//得到button2的属性width
var w=$("#button02").width();
w=w/2+"px"
$("#button02").animate({"left":"500px","width":w},2000)
.animate({"top":"30px"},2000);
});
});
});
</script>
</html></strong></span>