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"> <title></title> <style> #contaner{ width: 100%; height: 600px; margin: 0px auto; background: url(//repo.bfw.wiki/bfwrepo/images/game/feiniao/sky.png); position: relative; overflow: hidden; text-align: center; } #contaner #bird{ background: url(//repo.bfw.wiki/bfwrepo/images/game/feiniao/bird1.png) no-repeat; position: absolute; top: 230px; width: 30px; height: 30px; left: 50%; } #contaner h2{ font-weight: bold; color: #fff; cursor: pointer; top: 290px; position: absolute; left: 50%; margin-left: -30px; animation: bound 0.3s ease-in-out 0s infinite alternate; } @keyframes bound{ 0%{ transform: scale(1); } 25%{ transform: scale(0.8); } 50%{ transform: scale(1.2); } 100%{ transform: scale(1.5); color: #09f; } } #contaner #success{ width: 300px; height: 300px; font-weight: bold; margin: 60px -150px; position: absolute; z-index: 999; left: 50%; text-align: center; display: none; } #mask{ position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; opacity: 0.8; z-index: 99; display: none; } #contaner #success h1{ font-size: 35px; margin-top: 40px; color: #f00; } #contaner #success #results,span{ margin-top: 20px; color: #ff0; font-size: 20px; font-weight: bold; } #contaner #co{ color: #fff; font-weight: bold; font-size: 30px; position: fixed; top: 0; left: 50%; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0