基于基于javascript制作经典传统的拼图游戏制作经典传统的拼图游戏
本文实例为大家分享了javascript制作经典传统的拼图游戏的关键代码,供大家参考,具体内容如下
效果图:
拼出你喜欢的白雪公主和七个小矮人
实现代码:
<!DOCTYPE html>
<html>
<head>
<title>pingtu.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<style type="text/css">
*{ margin-bottom:0px;
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
padding-right: 0px;
padding-left: 0px;
padding-top: 0px;
padding-bottom: 0px;
border: 0px;
}
#box{
position:absolute;
top:0px;
left:0px;
width: 300px;
height: 300px;
border: 1px solid red;
}
#box img{
float:left;
width: 100px;
height: 100px;
}
#box .pj,#box .p2,#box .p3,#box .p4,#box .p5,#box .p6,#box .p7,#box .p8,#box .p9{
position: absolute;
评论0