<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="js/jquery-1.9.1.min.js"></script>
<style>
body{margin: 0; padding: 0;}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
</body>
<script type="text/javascript">
var w=$(window).width();
var h=$(window).height();
var c=document.getElementById("canvas");
c.width=w;
c.height=h-60;
var ctx=c.getContext("2d");
var img=new Image();
var img1=new Image();
var hua=new Image();
img.src="img/yueliang.png";
img1.src="img/s1.png"
hua.src="img/hua3.png"
img.onload=function(){
ctx.drawImage(img,0,0,w,w/2.05)
ctx.drawImage(img1,0,200,w,w/1.25)
so(0,900)
}
function so(x,y){
ctx.drawImage(hua,x,y)
}
var x=0,y=0
setInterval(function(){
x+=5;
y+=5;
},100)
</script>
</html>
小白师兄
相关分类