react实现自适应带进度答题考试问答表单试卷并显示结果和错题答案的效果代码
代码语言:html
所属分类:表单美化
代码描述:react实现自适应带进度答题考试问答试卷表单,并在回答完全部题目的时候显示最终结果和错题答案的效果代码
代码标签: react 自适应 答题 试卷 问答 考试 答案
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap"); * { box-sizing: border-box; font-family: "Be Vietnam Pro", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } button { font-family: "Be Vietnam Pro", sans-serif; } body { padding: 0 10vh; background-color: #1c1d20; background: #95e9e3; background: linear-gradient(62deg, #95e9e3 30%, #1fbed2 41%, #0b2632 85%); font-family: "Be Vietnam Pro", sans-serif; width: 100%; height: 100vh; overflow: hidden; display: flex; } body:after { content: ""; background-image: url(//repo.bfw.wiki/bfwrepo/image/6171f56b4f166.png); position: absolute; left: 0; top: 0; width: 100%; z-index: -1; height: 100%; background-repeat: no-repeat; transition: 0.3s; background-size: cover; background-attachment: fixed; background-position: center; } @media (max-width: 980px), (max-height: 580px) { body { padding: 60px 20px; } } #app { width: 100%; height: 100%; display: flex; align-items: center; flex-wrap: wrap; justify-content: center; } .game-started:after { transform: translateX(calc(-50% - 100px)); } @media (max-width: 980px), (max-height: 580px) { .game-started:after { transform: scale(1.2); } } .game { position: relative; max-width: 600px; width: 100%; height: 36vh; min-height: -webkit-max-content; min-height: -moz-max-content; min-height: max-content; margin: 32vh auto; box-shadow: 0 0 80px black, 0 0 0 16px rgba(152, 236, 255, 0.1); border-radius: 12px; overflow: hidden; scroll-behavior: smooth; display: flex; transition: 0.3s; } @media (max-width: 980px), (max-height: 580px) { .game { margin: auto; height: 52vh; flex-direction: column; overflow: auto; align-items: flex-start; } } .game[data-game-started] { max-width: 1200px; margin: 15vh auto; height: 70vh; } @media (max-width: 980px), (max-height: 580px) { .game[data-game-started] { height: auto; overflow: auto; margin: auto; max-height: 100%; } } .game[data-game-started] .intro { width: calc(50% - 100px); transition: 0.3s; } @media (max-width: 980px), (max-height: 580px) { .game[data-game-started] .intro { width: 100%; height: auto; } } .game[data-game-started] .intro-inner { padding: 20px; } @media (max-width: 980px), (max-height: 580px) { .game[data-game-started] .intro-inner { padding: 40px 20px; } } .game[data-game-started] .game-area { flex-shrink: 0; width: calc(50% + 100px); display: flex; align-items: center; flex-wrap: wrap; transition: 0.3s; flex-grow: 1; } @media (max-width: 980px), (max-height: 580px) { .game[data-game-started] .game-area { width: 100%; padding: 20px; } } .game-area { background-color: #fff; overflow: auto; padding: 40px; } @media (max-width: 980px), (max-height: 580px) { .game-area { padding: 0; } } .intro { background-size: cover; height: 100%; width: 100%; flex-shrink: 0; color: #fff; background-position: center; position: relative; display: flex; align-items: center; background: linear-gradient(251deg, #00b8ff52 -53%, rgba(255, 255, 255, 0) 65%); justify-content: center; -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); } .intro-inner { text-align: center; padding: 30px 60px; width: 100%; } .intro-title { margin: 0; font-size: 42px; text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.35); } .intro-desc { opacity: 0.8; font-weight: 300; } .intro-button { background-color: #1f8197; border: 0; padding: 12px 26px; color: #fff; border-radius: 4px; font-size: 18px; transform: translateY(20px); cursor: pointer; font-weight: 500; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); } .indicator { display: flex; justify-content: center; position: relative; max-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0