<div class="container">
<div class="top">
<div class="top-left">
<div class="top-left-side">
</div>
<div class="top-left-content">
<div class="logo">
<img src="plugin_assets/polls/images/icon-company.png" alt="公司图标">
<div class="logo-text">
<div class="company-name">武汉光庭信息技术股份有限...</div>
<div class="platform-name">数字化学习平台</div>
</div>
</div>
<div class="nav">
<div class="nav-item">
<img src="plugin_assets/polls/images/icon-home.png" alt="首页">
<span>首页</span>
</div>
<div class="nav-item">
<img src="plugin_assets/polls/images/icon_study.png" alt="学习中心">
<span>学习中心</span>
</div>
<div class="nav-item">
<img src="plugin_assets/polls/images/icon_shop.png" alt="知识商城">
<span>知识商城</span>
</div>
<div class="nav-item">
<img src="plugin_assets/polls/images/icon_profile.png" alt="个人中心">
<span>个人中心</span>
</div>
</div>
</div>
</div>
<div class="top-right">
<div class="search">
<label>
<input type="text" placeholder="请输入想要的内容">
</label>
<a class="search-icon">🔍︎</a>
</div>
</div>
</div>
<div class="home-tabs-container">
<div id="home-tab1-content" class="home-tab-content" style="display: block;">
首页
</div>
<div id="home-tab2-content" class="home-tab-content" style="display: none;">
学习中心
</div>
</div>
</div>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
height: 100%;
}
.container {
display: flex;
flex-direction: column;
height: 100vh;
}
/*********************top****************************/
.top {
height: 10vh;
background-color: #f0f0f0;
/*border-bottom: 1px solid #ccc;*/
display: flex;
box-sizing: border-box;
background-color: hsla(0, 0%, 100%, 0.6);
}
.top-left {
flex: 0 0 66.5%;
display: flex;
align-items: center;
}
.top-left-side {
flex: 1;
display: flex;
align-items: center;
}
.top-left-content {
flex: 0 0 70%;
display: flex;
align-items: center;
gap: 20px;
}
.top-right {
display: flex;
align-items: center;
justify-content: flex-start;
}
.logo {
display: flex;
align-items: center;
}
.logo img {
width: 38px;
height: 38px;
margin-right: 16px;
}
.logo-text {
display: flex;
flex-direction: column;
overflow: hidden;
}
.company-name {
font-size: 18px;
pointer-events: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.platform-name {
font-size: 14px;
color: #666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.nav {
display: flex;
gap: 25px;
justify-content: flex-start;
}
.nav-item {
display: flex;
flex-direction: row;
align-items: center;
white-space: nowrap;
gap: 3px;
font-size: 16px;
color: #a9a9a9;
text-decoration: none;
transition: color 0.3s;
}
.nav-item img {
width: 20px;
height: 20px;
flex-shrink: 0;
display: block;
}
.nav-item:hover {
color: #007bff;
}
.search {
flex: 0 0 285px;
position: relative;
max-width: 400px;
display: inline-block;
}
.search input {
width: 100%;
height: 30px;
padding-left: 35px;
font-size: 14px;
border: 1px solid #759fcf;
border-radius: 4px;
box-sizing: border-box;
}
.search-icon {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 30px;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
color: #888;
font-size: 16px;
background: transparent;
border: none;
}
/*********************bottom****************************/
.bottom {
flex: 1;
background-color: rgba(242, 242, 242, 0.3);
position: relative;
}
.home-content {
position: absolute;
top: 17px;
bottom: 0; /* 保持原有值 */
width: 100%;
}
.left-content {
min-width: 870px;
position: absolute;
left: 18.3%;
top: 0;
height: 100%;
/*width: 47%;*/
width: 870px;
padding: 0;
box-sizing: border-box;
/*border-right: 1px solid #ccc;*/
/*border-left: 1px solid #ccc;*/
}
/************************carousel***********************************************/
.carousel-container {
/*height: 37%;*/
height: 314px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 19px;
padding: 30px;
}
.carousel-inner {
width: 100%;
height: 100%;
padding: 0;
background-color: rgba(179, 179, 179, 0.3);
position: relative;
display: inline-block;
}
.carousel-text {
position: absolute;
top: 87%;
left: 32%;
transform: translate(-50%, -50%);
color: white;
font-size: 24px;
font-weight: bold;
text-shadow: 1px 1px 2px black;
z-index: 999;
}
.carousel-inner-img {
max-width: 60%;
height: 100%;
margin-left: 21%;
box-shadow: -25px 0 20px rgba(255, 255, 255, 0.5),
25px 0 20px rgba(255, 255, 255, 0.5);
}
/************************banner***********************************************/
.banner-container {
display: flex;
gap: 100px;
justify-content: flex-start;
height: 94px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 19px;
padding-left: 4%;
}
.banner-item {
display: flex;
flex-direction: row;
align-items: center;
white-space: nowrap;
gap: 3px;
font-size: 16px;
color: #a9a9a9;
text-decoration: none;
cursor: pointer;
}
.banner-item:hover {
color: #a9a9a9;
}
.banner-item img {
width: 55px;
height: 55px;
flex-shrink: 0;
display: block;
}
/************************@TODO content-card***********************************************/
.content-card {
position: relative;
width: 48%;
height: 83%;
background-color: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
padding: 20px;
margin: 10px 0;
transition: transform 0.2s;
}
/************************task***********************************************/
.task-container {
/*height: 20%;*/
height: 323px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 19px;
}
.task-title {
height: 20%;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding-left: 20px;
padding-right: 25px;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
gap: 15px;
}
.task-title-span {
font-size: 18px;
flex: 0 0 auto;
}
.task-tabs-container {
display: flex;
gap: 2px;
flex: 1 1 auto;
font-size: 14px;
color: #a9a9a9;
margin-left: 5%;
}
.task-tabs {
margin-right: 4.5%;
transition: color 0.3s;
}
.task-tabs > span {
position: relative;
padding-bottom: 40%;
cursor: pointer;
color: #a9a9a9;
}
.task-tabs > span:hover {
cursor: pointer;
}
.task-tabs.active span {
color: #007bff;
position: relative;
padding-bottom: 40%;
}
.task-tabs.active span::after {
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 100%;
height: 2px;
background-color: #007bff;
border-radius: 2px;
}
.task-all-tab {
flex: 0 0 auto;
color: #3798fb;
font-size: 16px;
cursor: pointer;
transition: color 0.3s ease;
}
.task-all-tab:hover {
color: #007bff;
}
.task-content {
height: 80%;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.task-tab-content {
position: relative;
height: 100%;
width: 100%;
}
.task-content-card {
position: relative;
background-color: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
transition: transform 0.2s;
width: 20%;
height: 80%;
margin-left: 2%;
margin-top: 2%;
}
.task-content-card:hover {
transform: translateY(-2px);
}
.task-card-header {
position: relative;
height: 50%;
}
.task-card-image {
position: relative;
height: 100%;
width: 100%;
border-radius: 5px 5px 0 0;
}
.task-card-image-text {
position: absolute;
top: 87%;
left: 15%;
transform: translate(-50%, -50%);
color: white;
font-size: 14px;
/*font-weight: bold;*/
text-shadow: 1px 1px 2px black;
z-index: 999;
}
.task-card-body {
position: relative;
}
.task-card-title {
position: relative;
padding-left: 4%;
margin-bottom: 2%;
font-size: 17px;
font-weight: 300;
flex: 0 0 auto;
}
.task-card-progress {
position: relative;
padding-left: 4%;
margin-bottom: 2%;
color: #f66;
}
.task-card-deadline {
position: relative;
padding-left: 4%;
color: #555;
}
.task-exam-card {
display: flex;
position: relative;
flex-direction: column;
align-items: center;
text-align: center;
}
.task-exam-card-image {
margin-top: 5%;
position: relative;
width: 14%;
height: auto;
}
.task-exam-card-tips {
position: relative;
margin-top: 3%;
color: #555;
font-size: 17px;
font-weight: 300;
}
/*****************************new-training******************************************************/
.new-training-container {
/*height: 20%;*/
height: 220px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 19px;
}
.new-training-title {
height: 64px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding-left: 20px;
padding-right: 25px;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
gap: 15px;
}
.new-training-title-span {
font-size: 18px;
flex: 0 0 auto;
}
.new-training-title-all {
flex: 0 0 auto;
color: #3798fb;
font-size: 16px;
cursor: pointer;
transition: color 0.3s ease;
}
.new-training-title-all:hover {
color: #007bff;
}
.new-training-content {
height: auto;
background-color: rgba(255, 255, 255, 1);
display: flex;
flex-wrap: wrap;
gap: 2%;
margin-top: 2%;
margin-left: 2%;
}
.new-training-content-card {
position: relative;
width: 48%;
height: 20%;
background-color: #fff;
border: 1px solid #e0e0e0;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
transition: transform 0.2s;
display: flex;
flex-direction: row;
box-sizing: border-box;
margin-bottom: 2%;
}
.new-training-card-left-section {
flex: 31%;
display: flex;
flex-direction: column;
padding: 10px;
box-sizing: border-box;
margin-left: 8px
}
.new-training-card-text {
font-size: 14px;
font-weight: 200;
flex: 0 0 auto;
color: #555;
}
.new-training-card-right-section {
flex: 60%;
display: flex;
flex-direction: column;
padding: 5px;
box-sizing: border-box;
justify-content: space-between;
}
.new-training-card-title {
font-size: 16px;
font-weight: 380;
flex: 0 0 auto;
margin-bottom: 4%;
}
.new-training-card-summary {
font-size: 12px;
width: 85%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 29ch;
}
.new-training-vertical-line {
width: 1px;
height: 23%;
background-color: #ccc;
margin-bottom: 4%;
margin-left: 10%;
margin-right: 10%;
}
.new-training-card-actions {
display: flex;
align-items: flex-end;
flex: 1;
margin-left: 59%;
}
/*****************************training******************************************************/
.training-container {
/*height: 20%;*/
height: 349px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 19px;;
}
.training-title {
height: 64px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding-left: 20px;
padding-right: 25px;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
gap: 15px;
}
.training-title-span {
font-size: 18px;
flex: 0 0 auto;
}
.training-title-all {
flex: 0 0 auto;
color: #3798fb;
font-size: 16px;
cursor: pointer;
transition: color 0.3s ease;
}
.training-title-all:hover {
color: #007bff;
}
.training-content {
height: auto;
background-color: rgba(255, 255, 255, 1);
display: flex;
flex-wrap: wrap;
gap: 2%;
margin-top: 2%;
margin-left: 2%;
align-items: stretch; /* 强制子元素高度一致 */
}
.training-content-card {
position: relative;
width: 48%;
height: auto;
background-color: #fff;
border: 1px solid #e0e0e0;
border-radius: 4px;
transition: transform 0.2s;
display: flex;
flex-direction: row;
box-sizing: border-box;
margin-bottom: 2%;
}
.training-content-card:hover {
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
0 0 25px rgba(180, 180, 180, 0.8);
}
.training-card-left-section {
flex: 31%;
display: flex;
flex-direction: column;
padding: 10px;
box-sizing: border-box;
margin-left: 8px
}
.training-card-image-cover {
height: 67px;
width: 120px;
border-radius: 5px;
margin-bottom: 6%;
}
.training-card-image-text{
position: absolute;
top: 57%;
left: 14%;
transform: translate(-50%, -50%);
color: white;
font-size: 13px;
text-shadow: 1px 1px 2px black;
z-index: 999;
writing-mode: horizontal-tb;
text-align: left;
}
.training-card-text {
font-size: 14px;
font-weight: 200;
flex: 0 0 auto;
color: #555;
width: 87%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 29ch;
}
.training-card-image-wrapper img {
max-width: 100%;
max-height: 100%;
/*object-fit: cover;*/
object-fit: fill; /* 拉伸图片以完全覆盖容器 */
border-radius: 3px;
}
.training-card-right-section {
flex: 60%;
display: flex;
flex-direction: column;
padding: 5px;
box-sizing: border-box;
justify-content: space-between;
}
.training-card-title {
font-size: 15px;
font-weight: 380;
flex: 0 0 auto;
margin-bottom: 4%;
width: 97%;
max-width: 29ch;
}
.training-card-summary {
font-size: 12px;
width: 85%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 29ch;
}
.training-vertical-line {
width: 1px;
height: 23%;
background-color: #ccc;
margin-bottom: 4%;
margin-left: 10%;
margin-right: 10%;
}
.training-card-actions {
display: flex;
align-items: flex-end;
flex: 1;
margin-left: 59%;
}
/*****************************courses******************************************************/
.courses-container {
/*height: 20%;*/
height: 349px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 19px;;
}
.courses-title {
height: 64px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding-left: 20px;
padding-right: 25px;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
gap: 15px;
}
.courses-title-span {
font-size: 18px;
flex: 0 0 auto;
}
.courses-title-all {
flex: 0 0 auto;
color: #3798fb;
font-size: 16px;
cursor: pointer;
transition: color 0.3s ease;
}
.courses-title-all:hover {
color: #007bff;
}
.courses-content {
height: auto;
background-color: rgba(255, 255, 255, 1);
display: flex;
flex-wrap: wrap;
gap: 2%;
margin-top: 2%;
margin-left: 2%;
align-items: stretch; /* 强制子元素高度一致 */
}
.courses-content-card {
position: relative;
width: 48%;
height: auto;
background-color: #fff;
border: 1px solid #e0e0e0;
border-radius: 4px;
transition: transform 0.2s;
display: flex;
flex-direction: row;
box-sizing: border-box;
margin-bottom: 2%;
}
.courses-content-card:hover {
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
0 0 25px rgba(180, 180, 180, 0.8);
}
.courses-card-left-section {
flex: 31%;
display: flex;
flex-direction: column;
padding: 10px;
box-sizing: border-box;
margin-left: 8px
}
.courses-card-image-cover {
height: 67px;
width: 120px;
border-radius: 5px;
margin-bottom: 6%;
}
.courses-card-image-text{
position: absolute;
top: 57%;
left: 18%;
transform: translate(-50%, -50%);
color: white;
font-size: 13px;
text-shadow: 1px 1px 2px black;
z-index: 999;
writing-mode: horizontal-tb;
text-align: left;
}
.courses-card-image-icon{
position: absolute;
top: 36%;
left: 16%;
transform: translate(-50%, -50%);
color: white;
font-size: 13px;
text-shadow: 1px 1px 2px black;
z-index: 999;
writing-mode: horizontal-tb;
text-align: left;
width: 19px;
height: 19px;
}
.courses-card-text {
font-size: 14px;
font-weight: 200;
flex: 0 0 auto;
color: #555;
width: 87%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 29ch;
}
.courses-card-image-wrapper img {
max-width: 100%;
max-height: 100%;
/*object-fit: cover;*/
object-fit: fill; /* 拉伸图片以完全覆盖容器 */
border-radius: 3px;
}
.courses-card-right-section {
flex: 60%;
display: flex;
flex-direction: column;
padding: 5px;
box-sizing: border-box;
justify-content: space-between;
}
.courses-card-title {
font-size: 15px;
font-weight: 380;
flex: 0 0 auto;
margin-bottom: 4%;
width: 97%;
max-width: 29ch;
}
.courses-card-summary {
font-size: 12px;
width: 85%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 29ch;
}
.courses-vertical-line {
width: 1px;
height: 23%;
background-color: #ccc;
margin-bottom: 4%;
margin-left: 10%;
margin-right: 10%;
}
.courses-card-actions {
display: flex;
align-items: flex-end;
flex: 1;
margin-left: 25%;
}
/*****************************exam******************************************************/
.exam-container {
/*height: 20%;*/
height: 349px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 50px;
}
.exam-title {
height: 64px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding-left: 20px;
padding-right: 25px;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
gap: 15px;
}
.exam-title-span {
font-size: 18px;
flex: 0 0 auto;
}
.exam-title-all {
flex: 0 0 auto;
color: #3798fb;
font-size: 16px;
cursor: pointer;
transition: color 0.3s ease;
}
.exam-title-all:hover {
color: #007bff;
}
.exam-content {
height: auto;
background-color: rgba(255, 255, 255, 1);
display: flex;
flex-wrap: wrap;
gap: 2%;
margin-top: 2%;
margin-left: 2%;
align-items: stretch;
}
.exam-content-card {
position: relative;
width: 48%;
height: auto;
background-color: #fff;
border: 1px solid #e0e0e0;
border-radius: 4px;
transition: transform 0.2s;
display: flex;
flex-direction: row;
box-sizing: border-box;
margin-bottom: 2%;
}
.exam-content-card:hover {
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
0 0 25px rgba(180, 180, 180, 0.8);
}
.exam-card-left-section {
flex: 31%;
display: flex;
flex-direction: column;
padding: 10px;
box-sizing: border-box;
margin-left: 8px
}
.exam-card-image-cover {
height: 67px;
width: 120px;
border-radius: 5px;
margin-bottom: 6%;
}
.exam-card-image-text{
position: absolute;
top: 57%;
left: 14%;
transform: translate(-50%, -50%);
color: white;
font-size: 13px;
text-shadow: 1px 1px 2px black;
z-index: 999;
writing-mode: horizontal-tb;
text-align: left;
}
.exam-card-text {
font-size: 14px;
font-weight: 200;
flex: 0 0 auto;
color: #a9a9a9;
width: 87%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 29ch;
}
.exam-card-image-wrapper img {
max-width: 100%;
max-height: 100%;
object-fit: fill;
border-radius: 3px;
}
.exam-card-right-section {
flex: 60%;
display: flex;
flex-direction: column;
padding: 5px;
box-sizing: border-box;
justify-content: space-between;
}
.exam-card-title {
font-size: 15px;
font-weight: 380;
flex: 0 0 auto;
margin-bottom: 4%;
width: 97%;
max-width: 29ch;
}
.exam-card-summary {
font-size: 12px;
width: 85%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 29ch;
}
.exam-card-actions {
display: flex;
align-items: flex-end;
/*flex: 1;*/
margin-left: 61%;
margin-bottom: 7%;
font-size: 14px;
font-weight: 300;
flex: 0 0 auto;
color: #555;
}
/*****************************content-gap******************************************************/
.content-gap {
height: 1px
}
/*****************************home-right******************************************************/
.right-side {
position: absolute;
right: 0;
top: 0;
width: 33.8%;
height: 100%;
padding: 0;
background-color: rgba(255, 255, 255, 0.6);
box-sizing: border-box;
/*border-left: 1px solid #ccc;*/
min-width: 200px;
}
/*****************************home-user-profile ******************************************************/
.home-user-profile {
width: 290px;
height: 247px;
position: relative;
box-sizing: border-box;
background-color: #fff;
border-radius: 5px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-left: 1%;
margin-bottom: 3%;
}
.home-user-profile-header {
height: 70%;
display: flex;
flex-direction: column;
padding: 10px;
box-sizing: border-box;
justify-content: center;
align-items: center;
width: 100%;
}
.home-user-circle-container {
width: 72px;
height: 72px;
border-radius: 50%;
overflow: hidden;
position: relative;
margin-bottom: 2%;
}
.home-user-circle-name{
font-size: 18px;
flex: 0 0 auto;
margin-bottom: 2%;
}
.home-user-circle-detail{
font-size: 12px;
font-weight: 300;
flex: 0 0 auto;
color: #a9a9a9;
}
.home-user-circle-image {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
display: block;
}
.home-user-profile-content {
flex: 1 0 30%;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 0;
}
.home-user-content-section {
padding: 10px;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.home-user-content-section:not(:last-child)::after {
content: '';
position: absolute;
right: 0;
top: 39%;
height: 41%;
width: 1px;
background: #e7e3e1;
}
.home-user-content-section-number {
font-size: 14px;
font-weight: bolder;
margin-bottom: 5px;
}
.home-user-content-section-desc {
font-size: 12px;
font-weight: 300;
flex: 0 0 auto;
color: #a9a9a9;
}
/*****************************home-top-corp ******************************************************/
.home-top-corp{
width: 290px;
height: auto;
position: relative;
box-sizing: border-box;
background-color: #fff;
border-radius: 5px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-left: 1%;
margin-bottom: 2%;
}
.home-top-corp-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
height: 60px;
position: relative;
}
.home-top-corp-header-left-item {
flex: 0 0 auto;
display: flex;
align-items: center;
}
.home-top-corp-header-center-item {
flex: 1;
text-align: center;
}
.home-top-corp-header-bold-text {
font-weight: 480;
font-size: 13px;
}
.home-top-corp-header-right-item {
flex: 0 0 auto;
display: flex;
align-items: center;
margin-left: 14px;
}
.home-top-corp-header-normal-text {
font-size: 14px;
flex: 0 0 auto;
color: #3798fb;
cursor: pointer;
transition: color 0.3s ease;
}
.home-top-corp-header-normal-text:hover {
color: #007bff;
}
.home-top-corp-header-item{
position: relative;
border-radius: 4px;
height: 60px;
width: 100%;
align-items: center;
display: flex;
padding-left: 6%;
}
.home-top-corp-header-item::after {
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 3%;
height: 3px;
background-color: rgba(179, 179, 179, 0.3);
width: 85%;
}
.home-top-corp-header-item-blue-circle {
display: inline-flex;
justify-content: center;
align-items: center;
width: 35px;
height: 35px;
background-color: #3798fb;
border-radius: 50%;
color: white;
font-size: 13px;
font-weight: 300;
}
.home-top-corp-header-item-span{
margin-left: 2%;
font-size: 15px;
font-weight: 500;
}
.home-top-corp-header-item-desc{
font-size: 12px;
font-weight: 300;
flex: 0 0 auto;
color: #a9a9a9;
margin-left: auto;
margin-right: 3%;
text-align: right;
white-space: nowrap;
}
.home-top-corp-content-item{
position: relative;
border-radius: 4px;
height: 60px;
width: 100%;
align-items: center;
display: flex;
padding-left: 6%;
}
.home-top-corp-content-item-blue-circle {
display: inline-flex;
justify-content: center;
align-items: center;
width: 35px;
height: 35px;
background-color: #3798fb;
border-radius: 50%;
color: white;
font-size: 13px;
font-weight: 300;
}
.home-top-corp-content-name-group {
position: relative;
display: flex;
flex-direction: column;
align-items: flex-start;
margin-left: 2%;
min-width: 0;
}
.home-top-corp-content-item-span{
margin-left: 2%;
font-size: 15px;
font-weight: 500;
}
.home-top-corp-content-item-custom-icon {
position: absolute;
right: 116%;
bottom: 0;
width: 13px;
height: auto;
margin-left: 8px;
}
.home-top-corp-content-sub-text {
font-size: 12px;
font-weight: 200;
color: #a9a9a9;
margin-top: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.home-top-corp-content-item-separator{
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0;
height: 1px;
background-color: rgba(179, 179, 179, 0.2);
width: 87%;
}
.home-top-corp-content-item-desc{
font-size: 15px;
font-weight: 700;
flex: 0 0 auto;
color: #3798fb;
text-align: right;
white-space: nowrap;
margin-left: auto;
margin-right: 8%;
}
/*****************************home-top-dept ******************************************************/
.home-top-dept{
width: 290px;
height: 247px;
position: relative;
box-sizing: border-box;
background-color: #fff;
border-radius: 5px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 0.5);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-left: 1%;
margin-bottom: 1%;
}
.home-top-dept-header{
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
height: 60px;
position: relative;
}
.home-top-dept-header-left-item {
flex: 0 0 auto;
display: flex;
align-items: center;
}
.home-top-dept-header-center-item {
flex: 1;
text-align: center;
}
.home-top-dept-header-bold-text {
font-weight: 480;
font-size: 13px;
}
.home-top-dept-header-right-item {
flex: 0 0 auto;
display: flex;
align-items: center;
margin-left: 14px;
}
.home-top-dept-header-normal-text {
font-size: 14px;
flex: 0 0 auto;
color: #3798fb;
cursor: pointer;
transition: color 0.3s ease;
}
.home-top-dept-header-normal-text:hover {
color: #007bff;
}
.home-top-dept-header-item{
position: relative;
border-radius: 4px;
height: 60px;
width: 100%;
align-items: center;
display: flex;
padding-left: 6%;
}
.home-top-dept-header-item::after {
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 3%;
height: 3px;
background-color: rgba(179, 179, 179, 0.3);
width: 85%;
}
.home-top-dept-header-item-blue-circle {
display: inline-flex;
justify-content: center;
align-items: center;
width: 35px;
height: 35px;
background-color: #3798fb;
border-radius: 50%;
color: white;
font-size: 13px;
font-weight: 300;
}
.home-top-dept-header-item-span{
margin-left: 2%;
font-size: 15px;
font-weight: 500;
}
.home-top-dept-header-item-desc{
font-size: 12px;
font-weight: 300;
flex: 0 0 auto;
color: #a9a9a9;
margin-left: auto;
margin-right: 3%;
text-align: right;
white-space: nowrap;
}
.home-top-dept-content-item{
position: relative;
border-radius: 4px;
height: 60px;
width: 100%;
align-items: center;
display: flex;
padding-left: 6%;
}
.home-top-dept-content-item-blue-circle {
display: inline-flex;
justify-content: center;
align-items: center;
width: 35px;
height: 35px;
background-color: #3798fb;
border-radius: 50%;
color: white;
font-size: 13px;
font-weight: 300;
}
.home-top-dept-content-name-group {
position: relative;
display: flex;
flex-direction: column;
align-items: flex-start;
margin-left: 2%;
min-width: 0;
}
.home-top-dept-content-item-span{
margin-left: 2%;
font-size: 15px;
font-weight: 500;
}
.home-top-dept-content-item-custom-icon {
position: absolute;
right: 116%;
bottom: 0;
width: 13px;
height: auto;
margin-left: 8px;
}
.home-top-dept-content-sub-text {
font-size: 12px;
font-weight: 200;
color: #a9a9a9;
margin-top: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.home-top-dept-content-item-separator{
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0;
height: 1px;
background-color: rgba(179, 179, 179, 0.2);
width: 87%;
}
.home-top-dept-content-item-desc{
font-size: 15px;
font-weight: 700;
flex: 0 0 auto;
color: #3798fb;
text-align: right;
white-space: nowrap;
margin-left: auto;
margin-right: 8%;
}
</style>
<script>
document.querySelectorAll('.task-tabs').forEach(tab => {
tab.addEventListener('click', () => {
document.querySelectorAll('.task-tabs').forEach(t => t.classList.remove('active'));
tab.classList.add('active');
document.querySelectorAll('.task-tab-content').forEach(content => {
content.style.display = 'none';
});
const targetTab = tab.getAttribute('data-tab');
const targetContent = document.getElementById(`task-${targetTab}-content`);
if (targetContent) {
targetContent.style.display = 'block';
}
});
});
</script>
实现点击 首页切换到 对应home-tab1-content 学习中心也是类似