js+css实现浏览器端英文句子单词填空练习代码
代码语言:html
所属分类:其他
代码描述:js+css实现浏览器端英文句子单词填空练习代码,请在edge浏览器中运行才能听到声音,chrome国内tts语音被屏蔽了。
代码标签: js css 浏览器 英语 句子 听写 练习 做题 答卷 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>英文句子单词输入练习</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 800px;
margin: 0 auto;
}
h1 {
text-align: center;
color: white;
margin-bottom: 30px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.card {
background: white;
border-radius: 20px;
padding: 30px;
margin-bottom: 20px;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.start-section {
text-align: center;
}
.btn {
padding: 15px 40px;
font-size: 18px;
border: none;
border-radius: 30px;
cursor: pointer;
transition: all 0.3s;
margin: 5px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-success {
background: #28a745;
color: white;
}
.btn-danger {
background: #dc3545;
color: white;
}
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.practice-section {
display: none;
}
.progress-bar {
width: 100%;
height: 10px;
background: #e9ecef;
border-radius: 5px;
margin-bottom: 20px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
transition: width 0.3s;
}
.stats {
display: flex;
justify-content: space-around;
margin-bottom: 20px;
flex-wrap: wrap;
}
.stat-item {
text-align: center;
padding: 10px 20px;
}
.stat-number {
font-size: 28px;
font-weight: bold;
color: #667eea;
}
.stat-label {
color: #666;
font-size: 14px;
}
.chinese-translation {
font-size: 24px;
text-align: center;
color: #333;
margin: 30px 0;
padding: 20px;
background: #f8f9fa;
border-radius: 10px;
border-left: 5px solid #667eea;
}
.sentence-container {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 8px;
font-size: 22px;
line-height: 2.5;
margin: 30px 0;
padding: 20px;
}
.word {
color: #333;
}
.word-input {
width: 120px;
padding: 8px 15px;
font-size: 20p.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0