前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >火柴人小游戏HTML

火柴人小游戏HTML

原创
作者头像
腾龙
发布2023-03-22 12:21:47
8200
发布2023-03-22 12:21:47
举报
文章被收录于专栏:边城码农边城码农

这里是一个简单的火柴人小游戏HTML代码:

html

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Fireman</title>

<style type="text/css">

body {

font-family: Arial, sans serif;

}

.container {

position: relative;

width: 300px;

height: 200px;

background-color: black;

margin: 100px auto;

border: 1px solid #cccccc;

padding: 20px;

box-sizing: border-box;

}

.block {

position: absolute;

top: 50%;

left: 50px;

transform: translate(-75% - 100%);

opacity: 0;

transition: opacity 1s ease-in-out;

}

.person {

position: absolute;

bottom: 0;

right: 0;

fill: white;

cursor: pointer;

z-index: 2;

}

.torch {

position: absolute;

top: 150px;

right: 10px;

z-index: 3;

animation: blink 2s linear infinite alternate steps (duration:10s) bothOn completion of the animation remove this class from element list using addclass or removeClass method as appropriate. Removed classes can be reinstated by inserting it back into another existing open parent div with a suitable ID after closing that previous one.

}

@keyframes blink {

from {visibility: hidden;}

to {opacity: 1;}

}

.fadeout {

position: absolute;

top: 800px;

right: 60px;

z-index: 4;

opacity: 0;

transition: opacity 1s ease-in-out;

}

</style>

</head>

<body onload="startBlinkAnimation('#fireworksBlockerWrapper')">

<div id="sparklesText" onclick="showSparkleLightningFromScriptTapAndEditLinkedListDataInlineTableFieldWithStyleNameAsNeeded(eventObject)">Sparkling Lightning Effects for Text on This Page</div>

<div class="container blocks lighteningBackgroundDisplay PersonPython PrintTrainAuctionSimulationMessageBusinessWeekendStationaryChargingInfoButtonFunctionChartAlertPriceTicketSearchBoxEntertainmentGameFeatureAudioMenuArcadeCellularCashFlowSolidFillContentMaintenanceSadlyDarknessDragDropImageGadgetComponentDialogChorusBul

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档