没有合适的资源?快使用搜索试试~ 我知道了~
本文实例为大家分享了JavaScript实现答题评分功能的具体代码,供大家参考,具体内容如下 效果图 直接上代码 HTML部分 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <link rel="stylesheet" href="./index.css"
资源详情
资源评论
资源推荐
JavaScript实现答题评分功能页面实现答题评分功能页面
本文实例为大家分享了JavaScript实现答题评分功能的具体代码,供大家参考,具体内容如下
效果图
直接上代码
HTML部分
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./index.css" >
<link rel="stylesheet" href="./timeTo.css" >
<title>JavaScript实现一个在线做题测试网页</title>
</head>
<body>
<div class="testContainer">
<h3>在线答题</h3>
<div class="testHeader">
<div class="testLeft">测试已开始,请开始作答,请在30分钟内完成答题</div>
<div class="testRight" id="countdown-11"></div>
</div>
<ul class="testContent">
</ul>
<div onclick="submitAnswer()" id="submitBtn">提交</div>
</div>
<script src="./jquery-2.1.1.min.js"></script>
<script src="./jquery.time-to.js"></script>
<script src="./index.js"></script>
</body>
</html>
CSS部分
index.css
timeTo.css
figure, figcaption {
display: block;
}
.transition {
-webkit-transition: top 400ms linear;
-moz-transition: top 400ms linear;
-ms-transition: top 400ms linear;
-o-transition: top 400ms linear;
transition: top 400ms linear;
}
.timeTo {
font-family: Tahoma, Verdana, Aial, sans-serif;
font-size: 28px;
line-height: 108%;
font-weight: bold;
height: 32px;
}
.timeTo span {
vertical-align: top;
}
.timeTo.timeTo-white div {
color: black;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 38%, #cccccc 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(38%,#ffffff), color-stop(100%,#cccccc)); /*
Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 38%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 38%,#cccccc 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 38%,#cccccc 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 38%,#cccccc 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
}
.timeTo.timeTo-black div {
color: white;
background: #45484d; /* Old browsers */
background: -moz-linear-gradient(top, #45484d 0%, #000000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /*
Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #45484d 0%,#000000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #45484d 0%,#000000 100%); /* IE10+ */
background: linear-gradient(to bottom, #45484d 0%,#000000 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /*
IE6-9 */
}
.timeTo.timeTo-black .timeTo-alert {
background: #a74444; /* Old browsers */
background: -moz-linear-gradient(top, #a74444 0%, #3f0000 67%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a74444), color-stop(67%,#3f0000)); /*
Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #a74444 0%,#3f0000 67%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #a74444 0%,#3f0000 67%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #a74444 0%,#3f0000 67%); /* IE10+ */
background: linear-gradient(to bottom, #a74444 0%,#3f0000 67%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a74444', endColorstr='#3f0000',GradientType=0 ); /*
IE6-9 */
}
.timeTo.timeTo-white .timeTo-alert {
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 35%, #e17373 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(35%,#ffffff), color-stop(100%,#e17373)); /*
Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 35%,#e17373 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 35%,#e17373 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 35%,#e17373 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 35%,#e17373 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e17373',GradientType=0 ); /* IE6-9
*/
}
.timeTo figure {
display: inline-block;
margin: 0;
padding: 0;
}
.timeTo figcaption {
text-align: center;
/*font-size: 12px;*/
line-height: 80%;
font-weight: normal;
color: #888;
}
.timeTo div {
position: relative;
display: inline-block;
width: 25px;
height: 30px;
border-top: 1px solid silver;
border-right: 1px solid silver;
border-bottom: 1px solid silver;
overflow: hidden;
}
.timeTo div.first {
border-left: 1px solid silver;
}
.timeTo ul {
list-style-type: none;
margin: 0;
padding: 0;
position: absolute;
left: 3px;
}
.timeTo ul li {
margin: 0;
padding: 0;
list-style: none;
}
jquery.time-to.js部分
/**
* Time-To jQuery plug-in
* Show countdown timer or realtime clock
*
* @author Oleksii Teterin <altmoc@gmail.com>
* @version 1.3.0
* @license MIT http://opensource.org/licenses/MIT
* @date 2019-05-14
* @host https://github.com/Lexxus/jq-timeTo
*/
剩余12页未读,继续阅读
weixin_38747211
- 粉丝: 12
- 资源: 901
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0