- Updated styles for the question creation page, including margin adjustments and new question type buttons (single choice, multiple choice, text). - Refactored the myQuestion page to use a table layout for better organization of questionnaire data, including new styles for table rows and hover effects. - Improved padding and positioning for various elements to enhance overall user experience.
312 lines
8.6 KiB
HTML
312 lines
8.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<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 {
|
|
background: #C3C3C3;
|
|
}
|
|
header {
|
|
background-color: #CF9A30;
|
|
color: #EEE8E4;
|
|
text-align: start;
|
|
padding: 20px;
|
|
display: flex;
|
|
}
|
|
main {
|
|
padding: 30px 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.box {
|
|
width: 90%;
|
|
padding: 20px;
|
|
position: relative;
|
|
background-color: #EBEBEB;
|
|
box-shadow: 1px 2px 2px rgba(0,0,0,0.4);
|
|
}
|
|
a{
|
|
text-decoration: none;
|
|
}
|
|
.quesen{
|
|
width: 32px;
|
|
height: 32px;
|
|
font-size: 28px;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
line-height: 24px;
|
|
color: #CF9A30;
|
|
border-radius: 50px;
|
|
padding-top: 5px;
|
|
background-color: #EBEBEB;
|
|
position: absolute;
|
|
font-style: normal;
|
|
top: 14px;
|
|
left: 60px;
|
|
}
|
|
.title{
|
|
margin-left: 80px;
|
|
font-size: 24px;
|
|
line-height: 20px;
|
|
font-weight: bold;
|
|
margin-right: 60px;
|
|
}
|
|
.nav-bar{
|
|
a{
|
|
line-height: 20px;
|
|
font-size: 20px;
|
|
color: #EEE8E4;
|
|
border: 2px solid #c78501;
|
|
padding: 2px;
|
|
}
|
|
}
|
|
.grid-bar{
|
|
width: 85%;
|
|
display: flex;
|
|
margin-bottom: 10px;
|
|
}
|
|
.grid-item-title{
|
|
color: #2E276D;
|
|
font-weight: bold;
|
|
span{
|
|
margin: 0 8px;
|
|
}
|
|
padding-right: 20px;
|
|
}
|
|
.grid-item-add{
|
|
color: #EEE8E4;
|
|
background: #CF9A30;
|
|
font-weight: bold;
|
|
padding: 0 5px;
|
|
border: 2px solid #c78501;
|
|
border-radius: 2px;
|
|
position: absolute;
|
|
right: 40px;
|
|
top: 20px;
|
|
z-index: 1;
|
|
}
|
|
.list-item{
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
list-style: none;
|
|
}
|
|
.quelist{
|
|
width: 100%;
|
|
}
|
|
.btn-group{
|
|
width: 33%;
|
|
float: right;
|
|
}
|
|
.item-title{
|
|
/* width: 33%; */
|
|
float: left;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: transparent;
|
|
box-shadow: none;
|
|
}
|
|
|
|
th, td {
|
|
padding: 10px;
|
|
text-align: left;
|
|
}
|
|
|
|
.thtitle, .data-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.thadd, .data-item {
|
|
flex: 0.8;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.btn-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 5px;
|
|
}
|
|
|
|
.btn-row button {
|
|
padding: 2px 5px;
|
|
}
|
|
|
|
.thtitle {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.thadd {
|
|
flex: 0.4;
|
|
padding: 0 5px;
|
|
white-space: nowrap;
|
|
text-align: left;
|
|
color: #2E276D;
|
|
}
|
|
|
|
.thadd:last-child {
|
|
flex: 1;
|
|
}
|
|
|
|
.data-row {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.data-item {
|
|
flex: 0.4;
|
|
padding: 0 5px;
|
|
text-align: left;
|
|
}
|
|
|
|
.data-item:last-child {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 5px;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
table th:first-child {
|
|
width: 35%;
|
|
}
|
|
|
|
table th:last-child {
|
|
width: 65%;
|
|
}
|
|
|
|
tr:not(:first-child) {
|
|
background-color: #EBEBEB;
|
|
box-shadow: 1px 2px 2px rgba(0,0,0,0.4);
|
|
margin-bottom: 10px;
|
|
position: relative;
|
|
}
|
|
|
|
tr:not(:first-child) td {
|
|
padding: 15px 10px;
|
|
border-bottom: 1px solid #C3C3C3;
|
|
}
|
|
|
|
table {
|
|
background: transparent;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.box {
|
|
background: transparent;
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* 添加行悬停效果 */
|
|
tr:not(:first-child):hover {
|
|
background-color: #e0e0e0; /* 稍微深一点的灰色 */
|
|
transition: background-color 0.3s ease; /* 添加过渡效果 */
|
|
}
|
|
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<i class="quesen">?</i>
|
|
<div class="title">问卷管理</div>
|
|
<div class="nav-bar">
|
|
<a href="#">我的问卷</a>
|
|
</div>
|
|
</header>
|
|
<main>
|
|
<div class="box">
|
|
<div class="grid-item-add">+ 新建问卷</div>
|
|
<table>
|
|
<tr>
|
|
<th style="width: 30%;">
|
|
<div class="grid-item-title" style="margin-left: 20px;">问卷标题</div>
|
|
</th>
|
|
<th style="width: 60%;">
|
|
<div class="thtitle">
|
|
<span class="thadd">创建日期</span>
|
|
<span class="thadd">发布日期</span>
|
|
<span class="thadd">截止日期</span>
|
|
<span class="thadd">问卷状态</span>
|
|
<span class="thadd">操作区域</span>
|
|
</div>
|
|
</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<div class="item-title">
|
|
<input type="checkbox">
|
|
<span>问卷标题</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="data-row">
|
|
<span class="data-item">2021-01-01</span>
|
|
<span class="data-item">2021-01-01</span>
|
|
<span class="data-item">2021-01-01</span>
|
|
<span class="data-item">已发布</span>
|
|
<div class="data-item">
|
|
<button>发布问卷</button>
|
|
<button>编辑问卷</button>
|
|
<button>删除问卷</button>
|
|
<button>查看问卷</button>
|
|
<button>填写问卷</button>
|
|
<button>分析问卷</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>
|
|
<div class="item-title">
|
|
<input type="checkbox">
|
|
<span>问卷标题</span>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="data-row">
|
|
<span class="data-item">2021-01-01</span>
|
|
<span class="data-item">2021-01-01</span>
|
|
<span class="data-item">2021-01-01</span>
|
|
<span class="data-item">已发布</span>
|
|
<div class="data-item">
|
|
<button>发布问卷</button>
|
|
<button>编辑问卷</button>
|
|
<button>删除问卷</button>
|
|
<button>查看问卷</button>
|
|
<button>填写问卷</button>
|
|
<button>分析问卷</button>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="ctrl-all box" style="
|
|
background-color: #EBEBEB;
|
|
box-shadow: 1px 2px 2px rgba(0,0,0,0.4);
|
|
padding: 10px;
|
|
width: 100%;
|
|
">
|
|
<input type="checkbox">
|
|
<span>全选</span>
|
|
<button>删除问卷</button>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html> |