帝王谷资源网 Design By www.wdxyy.com
本文实例为大家分享了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经典小游戏汇总
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
标签:
jQuery,飞机大战
帝王谷资源网 Design By www.wdxyy.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
帝王谷资源网 Design By www.wdxyy.com
暂无评论...
更新日志
2024年10月28日
2024年10月28日
- 群星2013-青春缤纷辑压箱宝大公开3CD2[新加坡限量版][WAV整轨]
- 林育群.2013-BalladShow(日本版)【环球】【WAV+CUE】
- 陈加洛.1992-痛到感觉不到【宝丽金】【WAV+CUE】
- 群星.2023-宿命之敌电视剧原声带【韶愔音乐】【FLAC分轨】
- 東京事変-大発見[FLAC+CUE]
- 椎名林檎-三文ゴシップ[FLAC+CUE]
- 2024年08月04日
- 裘德《裘德「最后的水族馆」演唱会LIVE》[320K/MP3][228.89MB]
- 裘德《裘德「最后的水族馆」演唱会LIVE》[24bit 48kHz][FLAC/分轨][2.08G]
- 基因三重奏《如果你什么都不说 音乐会现场录音》[320K/MP3][145.37MB]
- 孟庭苇.1996-月亮说话(2020环球24KGOLD限量版)【上华】【WAV+CUE】
- 群星.1997-新艺宝优质音响系列·国语精选监听版【新艺宝】【WAV+CUE】
- 阿桑.2005-寂寞在唱歌(星外星引进版)【华研国际】【WAV+CUE】
- 基因三重奏《如果你什么都不说 音乐会现场录音》[FLAC/分轨][287.43MB]
- 蔡题谦《我爱你,却依然要看你走》[320K/MP3][88.65MB]