本文实例为大家分享了jQuery实现飞机大战的具体代码,供大家参考,具体内容如下
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>飞机大战</title> <style> * { margin: 0px } .container { height: 700px; width: 500px; background-color: black; margin: 5px auto; /*上下外边距5px,左右自动*/ position: relative; } .plane { height: 80px; width: 80px; /*background:bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit; */ background: url(images/plane.png) no-repeat center / 100% 100%; position: absolute; bottom: 10px; left: calc(50% - 40px); } .bullet { height: 10px; width: 5px; /*border-radius *每个半径的四个值的顺序是:左上角,右上角,右下角,左下角。 *如果省略左下角,右上角是相同的。如果省略右下角,左上角是相同的。 *如果省略右上角,左上角是相同的。 */ border-radius: 45% 45% 0 0; /*box-shadow: h-shadow v-shadow blur spread color inset; *h-shadow: 必需,水平阴影的位置 *v-shadow: 必需,垂直阴影的位置 *blur: 可选,模糊距离 *spread: 可选,阴影的大小 *color: 可选,阴影的颜色 *inset: 可选,从外层的阴影(开始时)改变阴影内侧阴影 */ box-shadow: 0px 2px 10px orange; background: gold; position: absolute; } .enemy { height: 34.4px; width: 32.5px; /*background:bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit; */ background: url(images/enemy.png) no-repeat center / 100% 100%; transform: rotate(180deg); position: absolute; overflow: hidden; top: 0px; } h2 { height: 40px; display: table; border-color: deepskyblue; border-radius: 5px; background-color: deepskyblue; text-align: center; padding: 5px; position: relative; float: right; right: 300px; } </style> <!--引入jQuery--> <script src="/UploadFiles/2021-04-02/jquery-3.4.1.js">更多有趣的经典小游戏实现专题,分享给大家:
C++经典小游戏汇总
python经典小游戏汇总
python俄罗斯方块游戏集合
JavaScript经典游戏 玩不停
java经典小游戏汇总
javascript经典小游戏汇总
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
更新日志
2024年09月23日
2024年09月23日
- 群星.2009-Magic.Cover日粤精华3CD【环球】【WAV+CUE】
- 华少翌.2005-华少翌【中唱艺能】【WAV+CUE】
- 群星《十二女声Ⅱ》[WAV/CUE/分轨][527MB]
- 大自然音乐系列《漫步在山裡》[WAV/CUE/分轨][502.8MB]
- 大自然音乐系列《星光夜语》[WAV/CUE/分轨][453.3MB]
- 史依弘《史依弘交响乐京剧演唱专辑HQ》头版限量编号[WAV+CUE]
- 曼丽2020《女人三十风继续吹》HQCD[WAV+CUE]
- 曼丽2021《女人三十2雾之恋》HQCD[WAV+CUE]
- 隔壁老樊.2019-我曾【好听音乐】【FLAC分轨】
- 高林生.1993-牵挂你的人是我【白天鹅】【WAV+CUE】
- 洪卓立.2012-找个懂我的女孩(国专)【英皇娱乐】【WAV+CUE】
- 曼丽2022《女人三十3晚秋》HQCD[WAV+CUE]
- 曼丽2018《女人三十4冬天》HQCD[WAV+CUE]
- 柏菲-《好歌30年壹》限量开盘母带ORMCD[低速原抓WAV+CUE]
- 大自然音乐系列《水舞》[WAV/CUE/分轨][424.3MB]