css+js实现石头剪刀布猜拳游戏代码
代码语言:html
所属分类:游戏
代码描述:css+js实现石头剪刀布猜拳游戏代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@charset "UTF-8";
/**
Rock Paper Scissors Lizard Spock Game
author: @chrisbautista
website: https://www.codespud.com
*/
@import url("https://fonts.googleapis.com/css2?family=Fredoka+One&family=Source+Serif+Pro:ital@1&display=swap");
.visually-hidden {
position: absolute;
top: -9999px;
left: -9999px;
display: none;
}
body {
font-family: serif;
font-family: "Source Serif Pro", serif;
background-color: #f1f2f3;
}
h1 {
font-family: "Fredoka One", cursive;
font-size: 2.3vw;
margin-left: 2rem;
text-align: left;
background: -webkit-linear-gradient(red, green);
background: linear-gradient(red, green);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
text-fill-color: transparent;
margin-block-end: 0;
}
@media screen and (max-width: 1200px) {
h1 {
font-size: 3vw;
}
}
@media screen and (max-width: 900px) {
h1 {
font-size: 4vw;
}
}
@media screen and (max-width: 600px) {
h1 {
font-size: 6vw;
}
}
.cs-game {
display: flex;
justify-content: center;
padding: 1rem 2rem;
flex-direction: column;
}
.cs-game-board {
border-top: 4px solid #333;
}
.cs-win-lose,
.cs-computer,
.cs-player, .cs-score {
font-size: 2rem;
padding: 1.5rem 0;
}
.cs-score {
display: flex;
justify-content: space-between;
}
.cs-win-lose,
.cs-computer,
.cs-player {
display: flex;
align-items: center;
justify-content: .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0