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: 900px;
margin: 0 auto;
}
h1 {
text-align: center;
color: white;
margin-bottom: 30px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
font-size: 2.5em;
}
.card {
background: white;
border-radius: 20px;
padding: 40px;
margin-bottom: 20px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.section {
display: none;
}
.section.active {
display: block;
}
/* 开始界面 */
.start-section {
text-align: center;
}
.start-section h2 {
color: #333;
margin-bottom: 20px;
font-size: 1.8em;
}
.description {
color: #666;
margin-bottom: 30px;
font-size: 1.1em;
line-height: 1.6;
}
.settings {
background: #f8f9fa;
padding: 25px;
border-radius: 15px;
margin-bottom: 30px;
text-align: left;
max-width: 500px;
margin-left: auto;
margin-right: auto;
}
.setting-item {
margin-bottom: 20px;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 10px;
}
.setting-item:last-child {
margin-bottom: 0;
}
.setting-item label {
font-weight: 600;
color: #444;
font-size: 1.1em;
}
.setting-item select {
padding: 10px 15px;
border: 2px solid #ddd;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
background: white;
min-width: 150px;
}
.setting-item select:focus {
outline: none;
border-color: #667eea;
}
/* 按钮样式 */
.btn {
padding: 15px 40px;
font-size: 18px;
border: none;
border-radius: 30px;
cursor: pointer;
transition: all 0.3s;
margin: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}
.btn-secondary {
background: #6c757d;
color: white;
}
.btn-secondary:hover {
background: #5a6268;
transform: translateY(-2px);
}
.btn-success {
background: #28a745;
color: white;
}
.btn-success:hover {
background: #218838;
transform: translateY(-2px);
}
.btn-warning {
background: #ffc107;
color: #212529;
}
.btn-danger {
background: #dc3545;
color: white;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0