css+js实现图形问答小游戏代码
代码语言:html
所属分类:游戏
代码描述:css+js实现图形问答小游戏代码,根据文字提示选择正确的答案并点击。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link rel="canonical" href="https://codepen.io/Pedro-Ondiviela/pen/jORgbbK">
<style>
@import url("https://fonts.googleapis.com/css2?family=Major+Mono+Display&display=swap");
@media (max-width: 767px) {
html {
font-size: 12px;
}
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
color: white;
background: linear-gradient(60deg, #799df1, #60c1ec 30%, #7bd9de 60%, #cfb0d2 90%);
background-size: 100% 100%;
overflow: hidden;
font-family: "Major Mono Display", monospace;
}
.game {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
padding: 1rem;
color: #000038;
}
.game__wrapper {
position: relative;
width: 100%;
height: 100%;
max-width: 1400px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.game__start {
position: absolute;
top: 0;
left: 0;
z-index: 9;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
font-size: 35vh;
background: linear-gradient(60deg, #799df1, #60c1ec 30%, #7bd9de 60%, #cfb0d2 90%);
transition: transform 1s ease;
cursor: pointer;
}
.game__start:after {
content: "";
position: absolute;
top: calc(50% - 10vh);
left: calc(50% - 6.5vh);
border-top: 13vh solid transparent;
border-bottom: 13vh solid transparent;
border-left: 20vh solid #000038;
pointer-events: none;
transition: trans.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0