js实现欢乐打地鼠游戏代码
代码语言:html
所属分类:游戏
代码描述:js实现欢乐打地鼠游戏代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> .box { width: 800px; height: 600px; background: url('//repo.bfw.wiki/bfwrepo/images/game/dadishu/timg.jpg') no-repeat center; position: relative; left: 300px; cursor: url('//repo.bfw.wiki/bfwrepo/images/game/dadishu/chuizi.png'),auto; } .box img { width: 130px; height: 130px; position: absolute; top: 100px; left: 140px; visibility: hidden; z-index: 2; } img:nth-child(2) { top: 100px; left: 340px; } img:nth-child(3) { top: 100px; left: 540px; } img:nth-child(4) { top: 250px; left: 140px; } img:nth-child(5) { top: 250px; left: 340px; } img:nth-child(6) { top: 250px; left: 540px; } img:nth-child(7) { top: 380px; left: 140px; } img:nth-child(8) { top: 380px; left: 340px; } img:nth-child(9) { top: 380px; left: 540px; } button { width: 200px; height: 60px; position: absolute; top: 300px; left: 300px; background-color: red; border-radius: 20px; border: none; outline: none; } .times { width: 200px; height: 30px; background-color: yellow; border-radius: 20px; position: absolute; top: 100px; left: 100px; line-height: 30px; text-align: center; } .fens { width: 200px; height: 30px; background-color: yellow; border-radius: 20px; position: absolute; top: 100px; left: 500px; line-height: 30px; text-align: center; } </style> </head> <body> <div class="box"> <img src="//repo.bfw.wiki/bfwrepo/images/game/dadishu/mouse.png" alt=""> <img src="//repo.bfw.wiki/bfwrepo/images/game/dadishu/mouse.png" alt=""> <img src="//repo.bfw.wiki/bfwrepo/images/game/dadishu/mouse.png" alt=""> <img src="//repo.bfw.wiki/bfwrepo/images/game/dadishu/mouse.png" alt=""> <img src="//repo.bfw.wiki/bfwrepo/images/game/dadishu/mouse.png" alt=""> <img src="//repo.bfw.wiki/bfwrepo/images/game/dadishu/mouse.png" alt=""> &l.........完整代码请登录后点击上方下载按钮下载查看
网友评论0