简单的计时器应用,以及简单的坐标判断(当两色块相碰时触发函数)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
#npc{
position:absolute;
width: 20px;
height: 20px;
background-color: red;
border: 1px solid #000000;
}
span{
line-height: 30px;
}
</style>
</head><