This commit is contained in:
nopy 2024-07-07 15:58:33 +08:00
parent cbc40b4491
commit 9f2d309b15
2 changed files with 36 additions and 31 deletions

View File

@ -20,30 +20,35 @@
top: 60px; top: 60px;
background-image: linear-gradient(120deg,#ffffff,rgb(181, 181, 181),#fff); background-image: linear-gradient(120deg,#ffffff,rgb(181, 181, 181),#fff);
} }
.ul1-trainmanage{ .ul-trainmanage{
width: 650px; /* width: 650px; */
height: 200px; height: 200px;
position: absolute; position: absolute;
top: 50px; top: 50px;
left: 10px; left: 10px;
width: 95%; /* 占满其父元素的宽度 */
display: flex;
flex-wrap: wrap; /* 允许换行 */
padding-left: 20px; /* 移除默认的内边距 */
list-style-type: none; /* 移除列表项的默认标记 */
} }
.ul2-trainmanage{ .ul-trainmanage li{
width: 650px; width: calc(50% - 20px); /* 每个li占据其父元素宽度的一半减去外边距 */
height: 200px;
position: absolute;
top: 50px;
left: 700px;
}
.train-list-trainmanage li{
width: 650px;
height: 70px; height: 70px;
list-style-type: none; list-style-type: none;
margin-top: 10px;
border-radius: 10px; border-radius: 10px;
background-color: #ffffff; background-color: #ffffff;
box-shadow: 2px 2px 2px #d8d9d9; box-shadow: 2px 2px 2px #d8d9d9;
cursor: pointer; cursor: pointer;
margin: 10px; /* 外边距 */
box-sizing: border-box; /* 边框计算在宽度内 */
display: flex; /* 使用Flexbox布局 */
align-items: center; /* 垂直居中 */
padding: 0 15px; /* 内边距 */
position: relative;
} }
.train-list-trainmanage span { .train-list-trainmanage span {
font-size: 20px; font-size: 20px;
} }
@ -51,6 +56,14 @@
font-size: 15px; font-size: 15px;
margin-left: 460px; margin-left: 460px;
margin-top: -40px; margin-top: -40px;
flex-shrink: 0; /* span不缩小 */
white-space: nowrap;
flex-grow: 1; /* p标签占据剩余空间 */
margin: 0; /* 移除默认外边距 */
padding-left: 410px;
text-align: right; /* 右对齐文本 */
overflow-wrap: break-word; /* 允许长单词换行 */
word-break: break-all; /* 允许在任意字符处断行 */
} }
.train-list-trainmanage li::before { .train-list-trainmanage li::before {
content: "▶"; content: "▶";
@ -62,6 +75,10 @@
display: inline-block; display: inline-block;
} }
.sendtestpage{ .sendtestpage{
padding: 10px 30px; padding: 10px 30px;
font-size: 20px; font-size: 20px;

View File

@ -28,25 +28,13 @@ function TrainManage(){
<p>已批改的试卷</p> <p>已批改的试卷</p>
<div className='line'></div> <div className='line'></div>
{Data&&<div className='train-list-trainmanage'> {Data&&<div className='train-list-trainmanage'>
<ul className='ul1-trainmanage'> <ul className="ul-trainmanage">
<li> {['111', '222', '333', '444'].map(num => (
<span>111</span> <li key={num}>
<p>关闭时间2024-11-5</p> <span>{num}</span>
</li> <p>关闭时间{`2024-11-${num === '111' ? '11' : 'XX'}`}</p>
<li> </li>
<span>333</span> ))}
<p>关闭时间2024-11-5</p>
</li>
</ul>
<ul className='ul2-trainmanage'>
<li>
<span>222</span>
<p>关闭时间2024-11-5</p>
</li>
<li>
<span>444</span>
<p>关闭时间2024-11-5</p>
</li>
</ul> </ul>
<Link to='/teacher/trainmanage/TrainPods' className='ManagePods' >管理实训</Link> <Link to='/teacher/trainmanage/TrainPods' className='ManagePods' >管理实训</Link>
<Link to='/teacher/SendTrain' className='sendtestpage'>发布实训</Link> <Link to='/teacher/SendTrain' className='sendtestpage'>发布实训</Link>