h5小游戏5--杀死国王(附源码)

news2024/11/30 4:55:30

源代码如下

1.游戏基本操作

用空格键攻击,kill the king。

css样式源码

@charset "UTF-8";
			@font-face {
			  font-family: "AddLGBitmap09";
			  src: url("https://assets.codepen.io/217233/AddLGBitmap09.woff2") format("woff2"), url("https://assets.codepen.io/217233/AddLGBitmap09.woff") format("woff");
			  font-weight: normal;
			  font-style: normal;
			  font-display: swap;
			}
			body {
			  background: black;
			  color: white;
			  margin: 0;
			  padding: 0;
			  overflow: hidden;
			  font-family: "AddLGBitmap09";
			}
			
			.game_lose,
			.game_win {
			  position: absolute;
			  background: rgba(14, 3, 13, 0.94);
			  z-index: 99999;
			  width: 100%;
			  height: 100%;
			  text-align: center;
			  display: none;
			}
			.game_lose.show,
			.game_win.show {
			  display: block;
			}
			.game_lose .inner,
			.game_win .inner {
			  position: absolute;
			  width: 500px;
			  left: 0;
			  right: 0;
			  margin: auto;
			  top: 50%;
			  transform: translateY(-50%);
			}
			.game_lose .inner p,
			.game_win .inner p {
			  font-size: 12px;
			  line-height: 20px;
			}
			
			#app {
			  background: url("https://assets.codepen.io/217233/ssBg.png");
			  background-size: cover;
			  background-position: center;
			  height: 100vh;
			  width: 100%;
			  position: relative;
			  transition: all 0.1s;
			  position: relative;
			}
			@-webkit-keyframes shake {
			  0% {
			    left: -3px;
			    top: 3px;
			  }
			  20% {
			    left: 3px;
			    top: -3px;
			  }
			  40% {
			    left: 3px;
			    top: 3px;
			  }
			  60% {
			    left: -3px;
			    top: -3px;
			  }
			  80% {
			    left: 3px;
			    top: 3px;
			  }
			  100% {
			    left: 0;
			    top: 0px;
			  }
			}
			@keyframes shake {
			  0% {
			    left: -3px;
			    top: 3px;
			  }
			  20% {
			    left: 3px;
			    top: -3px;
			  }
			  40% {
			    left: 3px;
			    top: 3px;
			  }
			  60% {
			    left: -3px;
			    top: -3px;
			  }
			  80% {
			    left: 3px;
			    top: 3px;
			  }
			  100% {
			    left: 0;
			    top: 0px;
			  }
			}
			#app.pressed {
			  -webkit-animation: shake 0.1s forwards;
			          animation: shake 0.1s forwards;
			}
			
			.game_intro {
			  background: rgba(14, 3, 13, 0.94);
			  width: 100%;
			  height: 100%;
			  position: fixed;
			  z-index: 99;
			  transition: all 0.3s;
			}
			.game_intro.gamestarted {
			  opacity: 0;
			  pointer-events: none;
			}
			.game_intro__inner {
			  position: absolute;
			  left: 0;
			  right: 0;
			  margin: auto;
			  top: 50%;
			  width: 680px;
			  transform: translateY(-50%);
			  text-align: center;
			  transition: all 0.3s;
			  font-size: 12px;
			  line-height: 30px;
			}
			.game_intro__inner .begin {
			  text-align: center;
			  margin-top: 80px;
			  cursor: pointer;
			  transition: all 0.3s;
			}
			.game_intro__inner .begin:hover {
			  color: #76ece2;
			}
			.game_intro__inner .dialogue {
			  float: left;
			  width: 60%;
			  background: black;
			  color: white;
			  border-radius: 20px;
			  padding: 20px 31px;
			  position: relative;
			}
			.game_intro__inner p {
			  text-align: left;
			  clear: both;
			}
			.game_intro__inner span {
			  display: block;
			  color: #76ece2;
			  font-size: 9px;
			  text-align: left;
			  margin-bottom: -11px;
			  text-transform: uppercase;
			}
			.game_intro__inner .king {
			  float: right;
			  width: 140px !important;
			}
			.game_intro__inner.start {
			  transition: all 1s;
			}
			.game_intro__inner.start.gamestarted {
			  opacity: 0;
			  pointer-events: none;
			}
			.game_intro__inner .continue {
			  position: absolute;
			  z-index: 1;
			  cursor: pointer;
			  right: 20px;
			  font-size: 10px;
			  top: 175px;
			  transition: all 0.3s;
			}
			.game_intro__inner .continue:hover {
			  color: #76ece2;
			}
			.game_intro__inner.end {
			  opacity: 1;
			  pointer-events: all;
			  transition: all 1s 1s;
			}
			.game_intro__inner.end .continue {
			  opacity: 1;
			  transition: all 0.3s 6s;
			}
			.game_intro__inner.end.gamestarted {
			  opacity: 0;
			}
			.game_intro__inner.end.gamestarted .continue {
			  opacity: 0;
			}
			.game_intro__inner.gamestarted {
			  pointer-events: none;
			}
			.game_intro__inner img:nth-of-type(1) {
			  width: 400px;
			  -ms-interpolation-mode: nearest-neighbor;
			      image-rendering: -moz-crisp-edges;
			      image-rendering: pixelated;
			}
			.game_intro__inner img:nth-of-type(2) {
			  position: relative;
			  left: 0px;
			}
			.game_intro__inner img:nth-of-type(2) {
			  cursor: pointer;
			  margin-top: 40px;
			}
			.game_inner__tooltip {
			  width: 390px;
			  margin: 0 auto;
			  text-align: left;
			  position: absolute;
			  top: calc(50% + 240px);
			  left: 0;
			  right: 0;
			  margin: auto;
			  opacity: 0;
			  transition: all 0.3s;
			}
			.game_inner__tooltip.active {
			  opacity: 1;
			}
			.game_inner__tooltip .smash {
			  width: 100%;
			  text-align: center;
			  margin-top: 23px;
			  font-size: 9px;
			}
			.game_inner__tooltip .space {
			  width: 390px;
			  margin-top: 50px;
			  height: 50px;
			  background: white;
			  position: relative;
			  top: 0;
			  border-radius: 6px;
			  box-shadow: 0 10px #d6d6d6;
			  -webkit-animation: press2 0.1s infinite;
			          animation: press2 0.1s infinite;
			}
			@-webkit-keyframes press2 {
			  0% {
			    box-shadow: 0 10px #d6d6d6;
			    top: 0px;
			  }
			  100% {
			    box-shadow: 0 0px #d6d6d6;
			    top: 10px;
			  }
			}
			@keyframes press2 {
			  0% {
			    box-shadow: 0 10px #d6d6d6;
			    top: 0px;
			  }
			  100% {
			    box-shadow: 0 0px #d6d6d6;
			    top: 10px;
			  }
			}
			.game_inner__footer {
			  position: fixed;
			  left: 50px;
			  font-size: 7px;
			  z-index: 2;
			  bottom: 40px;
			  width: calc(100% - 100px);
			}
			.game_inner__footer .madeby {
			  position: relative;
			  top: 50px;
			}
			.game_inner__footer .resources {
			  float: right;
			}
			.game_inner__footer .resources div {
			  margin: 0 0 10px 0;
			  font-size: 12px;
			}
			.game_inner__footer .resources div img {
			  position: relative;
			  top: 3px;
			  margin-right: 8px;
			}
			.game_inner__footer a {
			  color: #d0295f;
			  text-decoration: none;
			}
			.game_inner__left {
			  text-align: center;
			  float: left;
			  position: relative;
			  width: calc(100%);
			  height: 100vh;
			}
			.game_inner__left .buttons {
			  float: right;
			  padding: 50px;
			}
			.game_inner__left .buttons img {
			  width: 32px;
			  float: left;
			  margin-left: 12px;
			  cursor: pointer;
			}
			.game_inner__left .buttons img.off {
			  opacity: 0.3;
			}
			.game_inner__left .logo {
			  padding: 50px;
			  float: left;
			}
			.game_inner__left .ui {
			  width: 100%;
			}
			.game_inner__left .ui_spaces {
			  font-size: 24px;
			  margin-bottom: 7px;
			}
			.game_inner__left .ui_progress {
			  width: 500px;
			  margin: 0 auto;
			  text-align: left;
			  position: absolute;
			  top: calc(50% - 300px);
			  left: 0;
			  right: 0;
			  margin: auto;
			}
			.game_inner__left .ui_progress__stage {
			  font-size: 9px;
			  margin-bottom: 11px;
			}
			.game_inner__left .ui_progress__bar {
			  width: 100%;
			  position: relative;
			}
			.game_inner__left .ui_progress__bar .inner {
			  background: url("https://assets.codepen.io/217233/ktkProgressInner.png");
			  height: 7px;
			  width: calc(100% - 6px);
			  background-size: 494px 7px;
			  position: absolute;
			  top: 10px;
			  z-index: 1;
			  left: 3px;
			  transition: all 0.4s;
			  max-width: 494px;
			}
			.game_inner__left .ui_progress__bar .outer {
			  background: url("https://assets.codepen.io/217233/ktkProgressOuter.png");
			  height: 12px;
			  width: 100%;
			  background-size: 500px 12px;
			  position: absolute;
			  top: 8px;
			}
			.game_inner__left .ui_progress__icons {
			  display: flex;
			  justify-content: space-between;
			  position: relative;
			  z-index: 1;
			  padding: 0 14px;
			}
			.game_inner__left .ui_progress__icons .icon {
			  flex-grow: 1;
			  text-align: center;
			}
			.game_inner__left .ui_progress__icons .icon_bg {
			  width: 28px;
			  height: 28px;
			  margin: auto;
			  background: url("https://assets.codepen.io/217233/ktkStageLocked.png");
			}
			.game_inner__left .ui_progress__icons .icon_bg.active:after {
			  width: 10px;
			  height: 10px;
			  content: "▲";
			  display: block;
			  position: relative;
			  top: 31px;
			  left: 9px;
			  font-size: 10px;
			}
			.game_inner__left .ui_progress__icons .icon_bg.complete {
			  background: url("https://assets.codepen.io/217233/ktkStageComplete.png");
			}
			.game_inner__left .ui_presses {
			  font-size: 12px;
			  opacity: 0.4;
			}
			.game_inner__left .center {
			  position: absolute;
			  left: 0;
			  right: 0;
			  margin: auto;
			  top: 50%;
			  transform: translateY(-50%);
			  width: 390px;
			}
			.game_inner__left .center .player_sprite,
			.game_inner__left .center .enemy_sprite {
			  width: 150px;
			  height: 150px;
			  -webkit-animation: idle 0.5s steps(7, end) infinite;
			          animation: idle 0.5s steps(7, end) infinite;
			  transform: scale(5);
			  -ms-interpolation-mode: nearest-neighbor;
			      image-rendering: -moz-crisp-edges;
			      image-rendering: pixelated;
			}
			.game_inner__left .center .player_sprite.pressed,
			.game_inner__left .center .enemy_sprite.pressed {
			  -webkit-animation: attack 0.15s steps(3, end);
			          animation: attack 0.15s steps(3, end);
			}
			.game_inner__left .center .characters {
			  width: 400px;
			  margin: 80px auto;
			}
			.game_inner__left .center .characters .stand {
			  width: 100%;
			  height: 100px;
			  background: #141627;
			  border-radius: 100%;
			  position: absolute;
			  bottom: -20px;
			  left: 9px;
			}
			.game_inner__left .center .characters .player {
			  z-index: 1;
			  position: relative;
			  left: 10px;
			  top: 60px;
			  transition: all 1s 0.3s;
			}
			.game_inner__left .center .characters .player.run {
			  left: 400px;
			  opacity: 0;
			}
			.game_inner__left .center .characters .player .stats {
			  position: absolute;
			  left: -110px;
			  text-align: left;
			  transform: translateY(4px);
			  font-size: 8px;
			  -webkit-animation: health 2s infinite;
			          animation: health 2s infinite;
			}
			.game_inner__left .center .characters .player .stats span {
			  font-size: 6px;
			  opacity: 0.75;
			  display: block;
			  padding-left: 24px;
			  padding-top: 4px;
			}
			.game_inner__left .center .characters .player .stats div {
			  margin-bottom: 10px;
			}
			.game_inner__left .center .characters .player .stats div img {
			  position: relative;
			  margin-right: 4px;
			  top: 3px;
			}
			.game_inner__left .center .characters .enemy {
			  position: relative;
			  top: -134px;
			  left: -40px;
			  transition: all 0.3s;
			}
			.game_inner__left .center .characters .enemy.run {
			  opacity: 0;
			}
			.game_inner__left .center .characters .enemy,
			.game_inner__left .center .characters .player {
			  width: 50%;
			  float: left;
			}
			.game_inner__left .center .enemy {
			  width: 100px;
			}
			.game_inner__left .center .enemy_hit, .game_inner__left .center .enemy_gold, .game_inner__left .center .enemy_xp {
			  position: absolute;
			  left: 98px;
			  top: 40px;
			  z-index: 1;
			  opacity: 0;
			}
			.game_inner__left .center .enemy_hit.pressed, .game_inner__left .center .enemy_gold.pressed, .game_inner__left .center .enemy_xp.pressed {
			  -webkit-animation: hit 0.15s forwards;
			          animation: hit 0.15s forwards;
			}
			.game_inner__left .center .enemy_gold.killed {
			  -webkit-animation: hit 0.3s 0.1s forwards;
			          animation: hit 0.3s 0.1s forwards;
			}
			.game_inner__left .center .enemy_xp {
			  left: 0;
			  right: 0;
			}
			.game_inner__left .center .enemy_xp.killed {
			  -webkit-animation: hit 0.3s 0.12s forwards;
			          animation: hit 0.3s 0.12s forwards;
			}
			.game_inner__left .center .enemy_sprite {
			  background: url("https://assets.codepen.io/217233/ssEnemyIdle_1.png");
			  -webkit-animation: none;
			          animation: none;
			  width: 200px;
			  -webkit-animation: enemyIdle 0.5s steps(7, end) infinite;
			          animation: enemyIdle 0.5s steps(7, end) infinite;
			  transform: scaleX(-5) scaleY(5);
			  position: relative;
			}
			.game_inner__left .center .enemy_sprite.boss {
			  background: url("https://assets.codepen.io/217233/ktkTrostIdle.png");
			  -webkit-animation: bossIdle 1s steps(7, end) infinite;
			          animation: bossIdle 1s steps(7, end) infinite;
			  width: 160px;
			  top: 10px;
			  left: 40px;
			  height: 105px;
			  filter: hue-rotate(0deg) !important;
			}
			.game_inner__left .center .enemy_sprite.boss.pressed {
			  -webkit-animation: bossHit 0.15s steps(3, end);
			          animation: bossHit 0.15s steps(3, end);
			}
			.game_inner__left .center .enemy_sprite.boss.killed {
			  -webkit-animation: bossKilled 0.8s steps(5, end);
			          animation: bossKilled 0.8s steps(5, end);
			}
			.game_inner__left .center .enemy_sprite.pressed {
			  -webkit-animation: enemyHit 0.15s steps(3, end);
			          animation: enemyHit 0.15s steps(3, end);
			}
			.game_inner__left .center .enemy_sprite.killed {
			  -webkit-animation: enemyKilled 0.8s steps(5, end);
			          animation: enemyKilled 0.8s steps(5, end);
			}
			.game_inner__left .center .enemy_health {
			  width: 190px;
			  height: 12px;
			  position: absolute;
			  left: 0;
			  font-size: 13px;
			  right: 0;
			  line-height: 39px;
			  border-radius: 10px;
			  top: 10px;
			  padding-top: 0px;
			  margin: auto;
			  background: url(https://assets.codepen.io/217233/ktkEnemyHealth.png);
			  -webkit-animation: health 2s infinite;
			          animation: health 2s infinite;
			}
			.game_inner__left .center .enemy_health_stats {
			  font-size: 7px;
			  padding-top: 6px;
			  text-align: left;
			}
			.game_inner__left .center .enemy_health_stats .name {
			  float: left;
			}
			.game_inner__left .center .enemy_health_stats .level {
			  float: right;
			}
			.game_inner__left .center .enemy_health_inner {
			  position: absolute;
			  left: 4px;
			  top: 3px;
			  height: 5px;
			  border-radius: 10px;
			  transition: all 0.1s;
			  max-width: 182px;
			  background: url(https://assets.codepen.io/217233/ktkEnemyHealthInner.png);
			}
			.game_inner__left .spaceBar {
			  width: 390px;
			  margin-top: 50px;
			  height: 50px;
			  background: white;
			  position: relative;
			  top: 0;
			  border-radius: 6px;
			  box-shadow: 0 10px #d6d6d6;
			  -webkit-animation: press2 0.1s forwards;
			          animation: press2 0.1s forwards;
			}
			@-webkit-keyframes health {
			  0% {
			    top: 10px;
			  }
			  50% {
			    top: 13px;
			  }
			  100% {
			    top: 10px;
			  }
			}
			@keyframes health {
			  0% {
			    top: 10px;
			  }
			  50% {
			    top: 13px;
			  }
			  100% {
			    top: 10px;
			  }
			}
			@-webkit-keyframes idle {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssIdle.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssIdle.png");
			    background-position: 100% 0;
			  }
			}
			@keyframes idle {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssIdle.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssIdle.png");
			    background-position: 100% 0;
			  }
			}
			@-webkit-keyframes attack {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssAttack1.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssAttack1.png");
			    background-position: 100% 0;
			  }
			}
			@keyframes attack {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssAttack1.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssAttack1.png");
			    background-position: 100% 0;
			  }
			}
			@-webkit-keyframes enemyIdle {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssEnemyIdle_1.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssEnemyIdle_1.png");
			    background-position: 100% 0;
			  }
			}
			@keyframes enemyIdle {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssEnemyIdle_1.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssEnemyIdle_1.png");
			    background-position: 100% 0;
			  }
			}
			@-webkit-keyframes bossIdle {
			  0% {
			    background: url("https://assets.codepen.io/217233/ktkTrostIdle.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ktkTrostIdle.png");
			    background-position: 100% 0;
			  }
			}
			@keyframes bossIdle {
			  0% {
			    background: url("https://assets.codepen.io/217233/ktkTrostIdle.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ktkTrostIdle.png");
			    background-position: 100% 0;
			  }
			}
			@-webkit-keyframes bossHit {
			  0% {
			    background: url("https://assets.codepen.io/217233/ktkTrostHit.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ktkTrostHit.png");
			    background-position: 100% 0;
			  }
			}
			@keyframes bossHit {
			  0% {
			    background: url("https://assets.codepen.io/217233/ktkTrostHit.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ktkTrostHit.png");
			    background-position: 100% 0;
			  }
			}
			@-webkit-keyframes bossKilled {
			  0% {
			    background: url("https://assets.codepen.io/217233/ktkTrostKilled.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ktkTrostKilled.png");
			    background-position: 100% 0;
			  }
			}
			@keyframes bossKilled {
			  0% {
			    background: url("https://assets.codepen.io/217233/ktkTrostKilled.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ktkTrostKilled.png");
			    background-position: 100% 0;
			  }
			}
			@-webkit-keyframes enemyHit {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssEnemyHit_1.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssEnemyHit_1.png");
			    background-position: 100% 0;
			  }
			}
			@keyframes enemyHit {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssEnemyHit_1.png");
			    background-position: 0% 0;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssEnemyHit_1.png");
			    background-position: 100% 0;
			  }
			}
			@-webkit-keyframes enemyKilled {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssEnemyDeath_1.png");
			    background-position: 0% 0;
			    opacity: 1;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssEnemyDeath_1.png");
			    background-position: 100% 0;
			    opacity: 0;
			  }
			}
			@keyframes enemyKilled {
			  0% {
			    background: url("https://assets.codepen.io/217233/ssEnemyDeath_1.png");
			    background-position: 0% 0;
			    opacity: 1;
			  }
			  100% {
			    background: url("https://assets.codepen.io/217233/ssEnemyDeath_1.png");
			    background-position: 100% 0;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit {
			  0% {
			    top: 40px;
			    opacity: 0;
			  }
			  100% {
			    top: -30px;
			    opacity: 1;
			  }
			}
			@keyframes hit {
			  0% {
			    top: 40px;
			    opacity: 0;
			  }
			  100% {
			    top: -30px;
			    opacity: 1;
			  }
			}
			@-webkit-keyframes hit-1 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 387px;
			    bottom: 96px;
			    opacity: 0;
			  }
			}
			@keyframes hit-1 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 387px;
			    bottom: 96px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-2 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 470px;
			    bottom: 81px;
			    opacity: 0;
			  }
			}
			@keyframes hit-2 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 470px;
			    bottom: 81px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-3 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 114px;
			    bottom: 30px;
			    opacity: 0;
			  }
			}
			@keyframes hit-3 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 114px;
			    bottom: 30px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-4 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 262px;
			    bottom: 36px;
			    opacity: 0;
			  }
			}
			@keyframes hit-4 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 262px;
			    bottom: 36px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-5 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 109px;
			    bottom: 95px;
			    opacity: 0;
			  }
			}
			@keyframes hit-5 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 109px;
			    bottom: 95px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-6 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 100px;
			    bottom: 68px;
			    opacity: 0;
			  }
			}
			@keyframes hit-6 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 100px;
			    bottom: 68px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-7 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 265px;
			    bottom: 1px;
			    opacity: 0;
			  }
			}
			@keyframes hit-7 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 265px;
			    bottom: 1px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-8 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 86px;
			    bottom: 45px;
			    opacity: 0;
			  }
			}
			@keyframes hit-8 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 86px;
			    bottom: 45px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-9 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 313px;
			    bottom: 89px;
			    opacity: 0;
			  }
			}
			@keyframes hit-9 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 313px;
			    bottom: 89px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-10 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 438px;
			    bottom: 46px;
			    opacity: 0;
			  }
			}
			@keyframes hit-10 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 438px;
			    bottom: 46px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-11 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 232px;
			    bottom: 6px;
			    opacity: 0;
			  }
			}
			@keyframes hit-11 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 232px;
			    bottom: 6px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-12 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 397px;
			    bottom: 61px;
			    opacity: 0;
			  }
			}
			@keyframes hit-12 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 397px;
			    bottom: 61px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-13 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 345px;
			    bottom: 100px;
			    opacity: 0;
			  }
			}
			@keyframes hit-13 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 345px;
			    bottom: 100px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-14 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 476px;
			    bottom: 34px;
			    opacity: 0;
			  }
			}
			@keyframes hit-14 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 476px;
			    bottom: 34px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-15 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 460px;
			    bottom: 61px;
			    opacity: 0;
			  }
			}
			@keyframes hit-15 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 460px;
			    bottom: 61px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-16 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 87px;
			    bottom: 47px;
			    opacity: 0;
			  }
			}
			@keyframes hit-16 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 87px;
			    bottom: 47px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-17 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 381px;
			    bottom: 2px;
			    opacity: 0;
			  }
			}
			@keyframes hit-17 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 381px;
			    bottom: 2px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-18 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 320px;
			    bottom: 20px;
			    opacity: 0;
			  }
			}
			@keyframes hit-18 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 320px;
			    bottom: 20px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-19 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 169px;
			    bottom: 3px;
			    opacity: 0;
			  }
			}
			@keyframes hit-19 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 169px;
			    bottom: 3px;
			    opacity: 0;
			  }
			}
			@-webkit-keyframes hit-20 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 469px;
			    bottom: 87px;
			    opacity: 0;
			  }
			}
			@keyframes hit-20 {
			  0% {
			    left: 0px;
			    bottom: 0px;
			    opacity: 1;
			  }
			  60% {
			    opacity: 1;
			  }
			  100% {
			    left: 469px;
			    bottom: 87px;
			    opacity: 0;
			  }
			}
			.game_inner__left .spaceBar.pressed {
			  -webkit-animation: press 0.05s forwards;
			          animation: press 0.05s forwards;
			}
			.game_inner__right {
			  float: right;
			  position: fixed;
			  width: 720px;
			  background: #160917;
			  left: 0;
			  right: 0;
			  border-radius: 10px;
			  border: 2px solid white;
			  z-index: 999;
			  top: 50%;
			  box-shadow: 0 0 0 1160px #0a0209d1;
			  margin: auto;
			  transform: translateY(-50%);
			}
			.game_inner__right p {
			  text-align: left;
			  font-size: 10px;
			  padding: 26px;
			}
			.game_inner__right .xp {
			  padding: 0 26px;
			  font-size: 12px;
			}
			.game_inner__right .nextPhase {
			  background: #73256a;
			  width: calc(100% - 52px);
			  margin: 0 26px 26px 26px;
			  text-align: center;
			  font-size: 12px;
			  padding: 20px 0;
			  border-radius: 10px;
			  cursor: pointer;
			  box-shadow: 0 4px #3d074e;
			}
			.game_inner__right .upgrades {
			  padding: 24px;
			}
			.game_inner__right .upgrades h2 {
			  text-transform: capitalize;
			  margin-bottom: 12px;
			  font-weight: normal;
			  font-size: 14px;
			}
			.game_inner__right .upgrades_upgrade .upgrade {
			  border: 2px solid white;
			  padding: 12px;
			  border-radius: 6px;
			  opacity: 0.6;
			  transition: all 0.3s;
			  pointer-events: none;
			  position: relative;
			  margin-bottom: 6px;
			  font-size: 11px;
			}
			.game_inner__right .upgrades_upgrade .upgrade:hover {
			  background: #ffffff0f;
			  padding: 12px 12px 12px 20px;
			}
			.game_inner__right .upgrades_upgrade .upgrade.max {
			  background: black;
			  pointer-events: none;
			}
			.game_inner__right .upgrades_upgrade .upgrade.max:after {
			  content: "max";
			  display: block;
			  position: absolute;
			  left: 0;
			  right: 0;
			  text-align: center;
			  margin: auto;
			  top: 50%;
			  transform: translateY(-50%);
			  width: 100%;
			  text-transform: uppercase;
			}
			.game_inner__right .upgrades_upgrade .upgrade.max div {
			  opacity: 0.12;
			}
			.game_inner__right .upgrades_upgrade .upgrade.bought {
			  pointer-events: none !important;
			  background: green;
			  opacity: 0.2 !important;
			}
			.game_inner__right .upgrades_upgrade .upgrade .name {
			  font-size: 11px;
			  margin-bottom: 5px;
			  text-transform: uppercase;
			}
			.game_inner__right .upgrades_upgrade .upgrade .description {
			  font-size: 8px;
			  opacity: 0.5;
			  margin-bottom: 4px;
			}
			.game_inner__right .upgrades_upgrade .upgrade .cost {
			  font-size: 8px;
			  color: red;
			  transition: all 0.3s;
			  margin-bottom: 3px;
			}
			.game_inner__right .upgrades_upgrade .upgrade .level {
			  font-size: 8px;
			  position: absolute;
			  right: 12px;
			  bottom: 12px;
			}
			.game_inner__right .upgrades_upgrade .upgrade .effect {
			  font-size: 8px;
			}
			.game_inner__right .upgrades_upgrade .upgrade.available {
			  opacity: 1;
			  pointer-events: all;
			  cursor: pointer;
			}
			.game_inner__right .upgrades_upgrade .upgrade.available .cost {
			  color: green;
			}
			
			.timer {
			  width: 128px;
			  margin: 0 auto;
			  text-align: left;
			  position: absolute;
			  top: calc(50% - 400px);
			  left: 4px;
			  right: 0;
			  font-size: 14px;
			  margin: auto;
			}
			.timer_inner {
			  position: relative;
			  top: -40px;
			  text-align: center;
			}
			.timer_inner div {
			  display: inline-block;
			  width: 28px;
			  position: relative;
			  margin: 0 3px 0;
			}
			.timer_inner div:after {
			  display: block;
			  content: ":";
			  position: absolute;
			  right: -11px;
			  top: 50%;
			  transform: translateY(-50%);
			}
			.timer_inner .ms {
			  font-size: 9px;
			  opacity: 0.7;
			  width: 22px;
			}
			.timer_inner .ms:after {
			  display: none;
			}

html源码


<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta name="google-site-verification" content="i3bVXD3ywVilJt3b0Denbr2n41les3p8ciIldduw4X0" />
		<title>海拥 | 杀死国王</title>	
		<link rel="icon" type="image/x-icon" href="http://haiyong.site/wp-content/uploads/2021/07/cropped-59255587-1-192x192.jpg"/>
		<meta name="keywords" content="杀死国王" />
		<meta name="description" content="杀死国王——游戏——海拥;立志打造一个拥有100个小游戏的摸鱼网站。Made By Haiyong,技术支持——海拥" /> 
		<meta name="author" content="海拥(http://haiyong.site)" />
		<meta name="copyright" content="海拥(http://haiyong.site)" />
		<link rel="stylesheet" href="css/style.css">	
	</head>
	<body>
			
		<div :class="{'pressed': pressed}" id='app'>
		  <audio controls='' crossorigin='anonymous' style='display: none;'>
		    <source src='https://assets.codepen.io/217233/ktkBgAudio.mp3' type='audio/mp3'>
		  </audio>
		  <div class='game'>
		    <div :class="{'show': gameover}" class='game_lose'>
		      <div class='inner'>
		        <h1>你没时间了!</h1>
		        <p>特罗斯特国王获胜,刷新以重试。</p>
		        <p>
		          你可以
		          <a href='https://github.com/wanghao221/moyu/'>在 Github 上关注我</a>
		          获取更多好玩的游戏
		        </p>
		      </div>
		    </div>
		    <div :class="{'show': gamewin}" class='game_win'>
		      <div class='inner'>
		        <h1>你赢了!</h1>
		        <p>特罗斯特国王被杀,恭喜!</p>
		        <p>
		          你可以
		          <a href='https://github.com/wanghao221/moyu/'>在 Github 上关注我</a>
		           获取更多好玩的游戏
		        </p>
		      </div>
		    </div>
		    <div :class="{'gamestarted': gameStarted}" class='game_intro'>
		      <div :class="{'gamestarted': introClicked}" class='game_intro__inner start'>
		        <img src='https://assets.codepen.io/217233/ktkLogo.png'>
		        <br>
		        <p @click='introClicked = !introClicked, audioController.play("crushyou")' class='begin'>BEGIN GAME</p>
		      </div>
		      <div :class="{'gamestarted': !introClicked}" class='game_intro__inner end'>
		        <div class='dialogue'>
		          <span>特罗斯特王</span>
		          <p>哈哈哈,你真的以为你能打败我!? 我的人会粉碎你,小屁孩。</p>
		          <p @click='introClicked = !introClicked, startGame()' class='continue'>Continue 点击继续</p>
		        </div>
		        <img class='king' src='https://assets.codepen.io/217233/kingTrost.png'>
		      </div>
		    </div>
		    <div class='game_inner'>
		      <div :class="{'active': tooltip}" class='game_inner__tooltip'>
		        <div class='space'></div>
		        <div class='smash'>粉碎空格键!</div>
		      </div>
		      <div class='game_inner__footer'>
		        <div class='madeby'>
		          Made by
		          <a href='http://haiyong.site' target='_blank'>Hai Yong</a>
		        </div>
		        <div class='resources'>
		          <div class='ui_xp'>
		            <img src='https://assets.codepen.io/217233/ktkXpIxon.png'>
		            {{ xp }}xp
		          </div>
		        </div>
		      </div>
		      <div class='game_inner__left'>
		        <div class='buttons'>
		          <img :class="{'off': !audioController.sfxOn}" @click='audioController.sfxOn = !audioController.sfxOn' src='https://assets.codepen.io/217233/ktkSfxButton.png'>
		          <img :class="{'off': muteBg}" @click='toggleBg()' src='https://assets.codepen.io/217233/ktkBgButton.png'>
		        </div>
		        <div class='logo'>
		          <img src='https://assets.codepen.io/217233/ktkLogo.png'>
		        </div>
		        <div class='timer'>
		          <img src='https://assets.codepen.io/217233/ktkTimerBg.png'>
		          <div class='timer_inner'>
		            <div class='minutes'>
		              {{ minutes }}
		            </div>
		            <div class='seconds'>
		              {{ seconds }}
		            </div>
		            <div class='ms'>
		              {{ ms }}
		            </div>
		          </div>
		        </div>
		        <div class='ui'>
		          <div class='ui_progress'>
		            <div class='ui_progress__stage'>
		              STAGE {{ stage }}
		            </div>
		            <div class='ui_progress__bar'>
		              <div :style='{width: `${((500 / enemiesPerStage) * (enemiesDefeated + 1)) - ((500 / enemiesPerStage) / 2)}px`}' class='inner'></div>
		              <div class='outer'></div>
		            </div>
		            <div class='ui_progress__icons'>
		              <div :key='enemies' class='icon' v-for='(enemies, index) in enemiesPerStage'>
		                <div :class="{'complete': index < enemiesDefeated, 'active': index == enemiesDefeated}" class='icon_bg'></div>
		              </div>
		            </div>
		          </div>
		        </div>
		        <div class='center'>
		          <div class='characters'>
		            <div :class="{'run': stageComplete}" class='player'>
		              <div class='stats'>
		                <div class='ui_strength'>
		                  <img src='https://assets.codepen.io/217233/ktkStrengthIcon.png'>
		                  {{ strength }} STR
		                  <br>
		                </div>
		                <div class='ui_intelligence'>
		                  <img src='https://assets.codepen.io/217233/ktkKnowledgeIcon.png'>
		                  {{ intelligence }} INT
		                </div>
		                <div class='ui_speed'>
		                  <img src='https://assets.codepen.io/217233/ktkSpeedIcon.png'>
		                  {{ speed }} SPD
		                </div>
		              </div>
		              <div :class="{'pressed': pressed}" class='player_sprite'></div>
		            </div>
		            <div :class="{'run': stageComplete}" class='enemy'>
		              <div :class="{'pressed': pressed, 'killed' : enemyKilled, 'boss' : boss}" :style='{filter: `hue-rotate(${80 * (stage - 1)}deg)`}' class='enemy_sprite'></div>
		              <div :class="{'pressed': pressed}" class='enemy_hit'>
		                {{ damage }}
		              </div>
		              <div :class="{'killed': enemyKilled}" class='enemy_xp'>
		                <img src='https://assets.codepen.io/217233/ktkXpIxon.png'>
		                {{ xpGained }}xp
		              </div>
		              <div class='enemy_health'>
		                <div class='enemy_health_stats'>
		                  <div class='name'>
		                    {{ enemy.name }}
		                  </div>
		                  <div class='level'>
		                    HP: {{ enemy.health }}
		                  </div>
		                </div>
		                <div :style='{width: `${100 * (enemy.health / enemy.initHealth)}%`}' class='enemy_health_inner'></div>
		              </div>
		            </div>
		          </div>
		        </div>
		      </div>
		      <div class='game_inner__right' v-if='shoppingPhase'>
		        <div class='timer'>
		          <img src='https://assets.codepen.io/217233/ktkTimerBg.png'>
		          <div class='timer_inner'>
		            <div class='minutes'>
		              {{ minutes }}
		            </div>
		            <div class='seconds'>
		              {{ seconds }}
		            </div>
		            <div class='ms'>
		              {{ ms }}
		            </div>
		          </div>
		        </div>
		        <p>将您的金币和经验用于升级</p>
		        <div class='xp'>
		          <img src='https://assets.codepen.io/217233/ktkXpIxon.png'>
		          {{ xp }}xp
		        </div>
		        <div class='upgrades'>
		          <div :key='upgrades.name' class='upgrades_upgrade' v-for='(upgrade, index) in upgrades'>
		            <h2>{{ index != 0 ? upgrade.type != upgrades[index - 1].type ? upgrade.type : '' : 'Skills' }}</h2>
		            <div :class="{'max' : upgrade.level > upgrade.maxLevel, 'available': upgrade.type == 'stat' ? xp >= upgrade.cost : gold >= upgrade.cost, 'bought': upgrade.bought}" @click='buy(index, upgrade.type, upgrade.stat);audioController.play("upgrade")' @mouseenter='audioController.play("hover")' class='upgrade'>
		              <div class='name'>{{ upgrade.names }}</div>
		              <div class='description'>{{ upgrade.descriptions }}</div>
		              <div class='cost'>
		                Cost: {{ upgrade.cost }} {{ upgrade.type == "stat" ? 'xp' : 'gold' }}
		              </div>
		              <div class='effect'>
		                +{{ upgrade.type == "stat" ? upgrade.increment : upgrade.damage }} {{ upgrade.metric }}
		              </div>
		              <div class='level' v-if="upgrade.type == 'stat'">
		                Level: {{ upgrade.level }}
		              </div>
		            </div>
		          </div>
		        </div>
		        <div @click='exitShoppingPhase' class='nextPhase'>下一关</div>
		      </div>
		    </div>
		  </div>
		</div>

	</body>

	<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.9/vue.min.js"></script>
	<script>
			        var _hmt = _hmt || [];
			        (function() {
			          var hm = document.createElement("script");
			          hm.src = "https://hm.baidu.com/hm.js?a9430a37066911650e26adadcc42798a";
			          var s = document.getElementsByTagName("script")[0]; 
			          s.parentNode.insertBefore(hm, s);
			        })();
			    </script>
	<script src="js/script.js"></script>
</html>

由于代码太多了,在资源绑定下载吧。 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2227010.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Canvas简历编辑器-选中绘制与拖拽多选交互设计

Canvas简历编辑器-选中绘制与拖拽多选交互设计 在之前我们聊了聊如何基于Canvas与基本事件组合实现了轻量级DOM&#xff0c;并且在此基础上实现了如何进行管理事件以及多层级渲染的能力设计。那么此时我们就依然在轻量级DOM的基础上&#xff0c;关注于实现选中绘制与拖拽多选交…

系统安全隐患设计面面观

如果只是靠程序员去设计系统的话&#xff0c;估计会有很多安全问题&#xff0c;所以才需要有架构师、设计师&#xff0c;来面面俱到的设计系统安全模块&#xff0c;来应对外部的威胁。 功能开发在系统设计中往往优先考虑&#xff0c;但忽视安全问题可能导致重大隐患。为了解决…

在线竞赛资源共享和交流:如何利用平台高效备战信息学竞赛

在备战信息学竞赛的过程中&#xff0c;资源共享和交流已经成为不可或缺的一部分。如今&#xff0c;在线平台提供了丰富的学习资源、讨论机会和备考支持&#xff0c;考生可以通过真题解析、考点讨论群、备赛社区等方式&#xff0c;与其他考生互动&#xff0c;提升学习效果。本文…

中国五矿集团采购信息

打开https://ec.minmetals.com.cn/open/home/purchase-info点击第二页可以看到参数被加密了 要使用js的hook脚本为 (function() { var stringify_ JSON.stringify; JSON.stringify function(arg) { console.log("您猜怎么着&#xff1f;断住了&#xff01; ——> …

不到 30 元的 AX1800 路由器!捷稀 JCG Q20 免拆机刷 Padavan / OpenWRT

本文首发于只抄博客&#xff0c;欢迎点击原文链接了解更多内容。 前言 上次把移动送的 JCG Q30 Pro 刷机之后&#xff0c;又从家里翻出个之前电信送的伊拉克战损 AX1800 路由器&#xff0c;意外的发现品牌也是 JCG&#xff0c;型号是 Q20&#xff0c;想着能不能也给它刷了。目…

企业内训|LLM大模型在服务器和IT网络运维中的应用-某日企IT运维部门

本课程是为某在华日资企业集团的IT运维部门专门定制开发的企业培训课程&#xff0c;本课程旨在深入探讨大型语言模型&#xff08;LLM&#xff09;在服务器及IT网络运维中的应用&#xff0c;结合当前技术趋势与行业需求&#xff0c;帮助学员掌握LLM如何为运维工作赋能。通过系统…

遗传算法与深度学习实战(20)——使用进化策略自动超参数优化

遗传算法与深度学习实战&#xff08;20&#xff09;——使用进化策略自动超参数优化 0. 前言1. 将进化策略应用于超参数优化2. 使用主成分分析扩展维度小结系列链接 0. 前言 我们已经学习了遗传算法 (Genetic Algorithms, GA) 的工作原理&#xff0c;并使用进化策略 (Evolutio…

进入 Masteria:第三周游戏指南

Alpha 第四季在 The Sandbox 中继续展开&#xff0c;这次为大家带来一个全新的星球&#xff01;踏上 Masteria——一个专注于追求完美的星球。在这个星球的严酷环境中训练、竞争&#xff0c;并磨练你的技能。无论是通过「The Voice: 教练对决」细致打磨你的声乐技巧&#xff0c…

java-web-day5

1.spring-boot-web入门 目标: 开始最基本的web应用的构建 使用浏览器访问后端, 后端给浏览器返回HelloController 流程: 1.创建springboot工程, 填写模块信息, 并勾选web开发的相关依赖 注意: 在新版idea中模块创建时java下拉框只能选17, 21, 23 这里选17, maven版本是3.6.3, 很…

【数据结构】二叉树——堆

一、二叉树的概念与结构 二叉树的概念 二叉树是树的一种&#xff0c;二叉树的特殊之处在于&#xff0c;每个根节点都可以有两个子节点&#xff0c;可以两个子节点都为空&#xff0c;或者一个为空&#xff0c;一个不为空&#xff0c;或者两个都有数&#xff0c;在构建二叉树的…

scala 权限

一.访问权限 idea实例 关于protected:

开源AI助力医疗革新:OCR系统与知识图谱构建

在医疗健康领域&#xff0c;数据的整合和分析对于提升临床决策、优化患者护理和加速科研发现至关重要。思通数科AI平台通过构建医疗知识图谱&#xff0c;从海量医疗文本中提取关键信息&#xff0c;助力医疗服务智能化。我们的平台体验地址是&#xff1a;https://nlp.stonedt.co…

ELK之路第二步——可视化界面Kibana

Kibana 1.安装2.解压3.修改配置4.启动 这部分内容就比较简单了&#xff0c;水一片文章。 1.安装 需要梯子 官网下载链接&#xff1a;https://www.elastic.co/cn/downloads/past-releases/kibana-7-3-0 如果你去官网下载页面&#xff0c;点击下载是404报错&#xff0c;记得切换…

关键词排名技巧实用指南提升网站流量的有效策略

内容概要 在数字营销的世界中&#xff0c;关键词排名的影响不可小觑。关键词是用户在搜索引擎中输入的词语&#xff0c;通过精确选择和优化这些关键词&#xff0c;网站能够更轻松地被目标用户发现。提升关键词排名的第一步是了解基本概念&#xff0c;包括关键词的分类、重要性…

Java 多线程(八)—— 锁策略,synchronized 的优化,JVM 与编译器的锁优化,ReentrantLock,CAS

前言 本文为 Java 面试小八股&#xff0c;一句话&#xff0c;理解性记忆&#xff0c;不能理解就死背吧。 锁策略 悲观锁与乐观锁 悲观锁和乐观锁是锁的特性&#xff0c;并不是特指某个具体的锁。 我们知道在多线程中&#xff0c;锁是会被竞争的&#xff0c;悲观锁就是指锁…

Uniapp如何处理后端返回图片流验证码

登录验证码请求接口返回内容为乱码 处理代码 uni.request({url: 你请求的地址,method: POST,data:data,header:header,//请求头responseType: arraybuffer,//告诉服务器你希望得到的响应类型为arraybuffer&#xff08;二进制数据&#xff09;类型success: res > {let resul…

QT 多语言转换 ts、qm

QT开发之路 企业级开发系列文章&#xff0c;主要目标快速学习、完善、提升 相关技能 高效完成企业级项目开发 分享在企业中积累的实用技能和经验。 通过具体的编码过程、代码示例、步骤详解、核心内容和展示的方法解决遇到的实际问题。 阅读前声明 本系列文章属于付费内容 禁止…

【论文笔记】Perceiver: General Perception with Iterative Attention

&#x1f34e;个人主页&#xff1a;小嗷犬的个人主页 &#x1f34a;个人网站&#xff1a;小嗷犬的技术小站 &#x1f96d;个人信条&#xff1a;为天地立心&#xff0c;为生民立命&#xff0c;为往圣继绝学&#xff0c;为万世开太平。 基本信息 标题: Perceiver: General Perce…

spring-第十一章 注解开发

spring 文章目录 spring前言1.注解回顾1.1原理1.2springIOC注解扫描原理1.2.1解释1.2.2案例 2.声明bean的注解补充&#xff1a;Bean注解&#xff0c;管理三方包对象 3.spring注解的使用3.1加入aop依赖3.2配置文件中添加context命名空间3.3配置文件中指定要扫描的包3.4在Bean上使…

【CSS in Depth 2 精译_055】8.3 伪类 :is() 和 :where() 的正确打开方式

当前内容所在位置&#xff08;可进入专栏查看其他译好的章节内容&#xff09; 【第三部分 现代 CSS 代码组织】 ✔️【第八章 层叠图层及其嵌套】 ✔️ 8.1 用 layer 图层来操控层叠规则&#xff08;上篇&#xff09; 8.1.1 图层的定义&#xff08;上篇&#xff09;8.1.2 图层的…