Files
PC-Light-Forum/css/index.less
DESKTOP-RQ919RC\Pc f2469a1a3b fix(样式): 修复移动端布局问题并优化样式
修复移动端搜索页面的布局问题,优化响应式设计
调整头部导航栏的z-index防止遮挡
统一处理签到组件的显示逻辑
修复搜索推荐框宽度问题
优化媒体查询断点设置
2025-12-24 18:54:19 +08:00

1009 lines
29 KiB
Plaintext

#appIndex {
max-width: 1200px;
margin: 0 auto;
a {
text-decoration: none;
}
.header-content-box {
justify-content: space-between;
margin-bottom: 28px;
.header-content-left {
width: calc(100% - 252px);
.adv-list {
margin-bottom: 18px;
.adv-item {
width: calc((100% - 12px) / 2);
height: 60px;
display: flex;
align-items: center;
&:not(:last-child) {
margin-right: 12px;
}
a {
display: block;
}
img {
width: 100%;
height: auto;
border-radius: 10px;
display: block;
object-fit: cover;
}
}
}
.topic-and-selectives {
.head-top {
width: 64px;
height: 24px;
border-radius: 20px 20px 20px 0;
margin-top: 0;
margin-bottom: 10px;
.icon {
width: 15px;
height: 12px;
margin-right: 3px;
}
.text {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
color: #ffffff;
font-size: 14px;
}
}
.topic-box {
width: calc((100% - 12px) * 0.325);
height: 320px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
padding: 10px;
margin-right: 12px;
.head-top {
background-color: rgba(244, 174, 56, 1);
}
.topic-head {
height: 109px;
background-color: rgba(246, 246, 246, 1);
border-radius: 8px;
flex-direction: column;
justify-content: space-between;
padding: 12px 16px;
margin-bottom: 12px;
.title {
font-size: 16px;
color: #000000;
line-height: 23px;
}
.hint {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 14px;
color: #7f7f7f;
}
.people {
position: relative;
justify-content: space-between;
&::after {
content: "";
position: absolute;
top: 0;
left: 0;
transform: translateY(-100%);
width: 30px;
height: 4px;
background-color: rgba(244, 174, 56, 1);
border-radius: 150px;
}
.left {
color: #aaaaaa;
font-size: 13px;
.number {
color: #333333;
margin-right: 3px;
}
}
.right {
.item {
width: 26px;
height: 26px;
border-radius: 50%;
.img {
width: 26px;
height: 26px;
border-radius: 50%;
}
&:nth-child(4) {
margin-right: -9px;
}
&:nth-child(3) {
margin-right: -9px;
}
&:nth-child(2) {
margin-right: -7px;
}
&:nth-child(2) {
margin-right: -5px;
}
}
}
}
}
.topic-list {
.item {
cursor: pointer;
&:not(:last-child) {
margin-bottom: 1px;
}
.img {
width: 12px;
height: 10px;
margin-right: 9px;
}
.text {
font-size: 14px;
color: #555555;
line-height: 28px;
&:hover {
color: #000000;
}
}
}
}
}
.selectives-box {
width: calc((100% - 12px) * 0.675);
height: 320px;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;
padding: 10px;
.head-top {
background-color: rgba(246, 130, 81, 1);
margin-bottom: 22px;
}
.list {
flex-wrap: wrap;
padding: 0 5px;
justify-content: space-between;
.item {
width: 48%;
font-size: 14px;
color: #555555;
line-height: 20px;
margin-bottom: 12px;
position: relative;
cursor: pointer;
&:hover {
color: #000000;
}
.dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #f68251;
margin-right: 10px;
}
.text {
width: auto;
flex: 1;
}
}
}
}
}
.header-left-bottom-box {
width: 100%;
height: auto;
background-color: rgb(255, 255, 255);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
padding: 12px;
margin-top: 12px;
.adv {
margin-right: 26px;
width: 31%;
flex-shrink: 0;
.adv-icon {
width: 100%;
height: auto;
border-radius: 5px;
cursor: pointer;
object-fit: cover;
}
}
.list {
font-size: 14px;
color: #555555;
flex: 1;
margin-right: 39px;
&.list2 {
margin-right: 0;
.item .text {
width: auto;
}
}
.item {
height: 20px;
&:not(:last-of-type) {
margin-bottom: 12px;
}
.icon {
width: 6px;
height: 6px;
margin-right: 10px;
background: #30b0d5;
border-radius: 50%;
}
.text {
cursor: pointer;
width: auto;
text-decoration: none;
color: #555;
&:hover {
color: #000000;
}
}
}
}
}
}
.header-content-right {
width: 240px;
.post-entrance {
background-color: #fff;
border: 1px solid #e9eef2;
border-radius: 10px;
padding: 10px;
margin-bottom: 10px;
.entrance-top {
height: 46px;
background-color: rgba(213, 243, 247, 1);
border-radius: 8px;
font-size: 14px;
text-align: center;
color: #333;
cursor: pointer;
padding-left: 52px;
margin-bottom: 8px;
&:hover {
background-color: rgba(194, 239, 246, 1);
}
.icon {
width: 20px;
height: 20px;
margin-right: 13px;
}
}
.entrance-bottom {
height: 90px;
flex-wrap: wrap;
background-color: #f6f6f6;
border-radius: 8px;
overflow: hidden;
.item {
width: 50%;
height: 50%;
cursor: pointer;
font-size: 14px;
color: #333;
text-decoration: none;
&:nth-child(odd) {
border-right: 1px solid #ebebeb;
}
&:not(:nth-last-child(-n + 2)) {
border-bottom: 1px solid #ebebeb;
}
&:hover {
background-color: #e7e7e7;
}
.icon-box {
position: relative;
width: 16px;
height: 16px;
margin-right: 8px;
.icon {
position: absolute;
width: 38px;
top: -8px;
left: -6px;
}
}
}
}
}
.adv {
width: 240px;
height: 140px;
margin-bottom: 10px;
display: block;
a {
display: block;
}
img {
width: 240px;
height: 140px;
border-radius: 10px;
display: block;
}
}
.group-box {
width: 240px;
height: 150px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
padding: 10px;
margin-bottom: 10px;
.group {
flex-wrap: wrap;
height: 100%;
.group-item {
width: 50%;
height: 50%;
cursor: pointer;
font-size: 14px;
color: #333;
text-decoration: none;
flex-direction: column;
background-color: rgba(246, 246, 246, 1);
&:nth-child(1) {
border-top-left-radius: 8px;
}
&:nth-child(2) {
border-top-right-radius: 8px;
}
&:nth-child(3) {
border-bottom-left-radius: 8px;
}
&:nth-child(4) {
border-bottom-right-radius: 8px;
}
// overflow: hidden;
&:nth-child(odd) {
border-right: 1px solid #ebebeb;
}
&:not(:nth-last-child(-n + 2)) {
border-bottom: 1px solid #ebebeb;
}
&:hover {
background-color: #e7e7e7;
}
.icon {
width: 16px;
height: 16px;
margin-right: 6px;
}
font-size: 14px;
text-align: center;
line-height: 22px;
position: relative;
.title {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
color: #000000;
}
.subtitle {
color: #555555;
}
&:hover .QRcode-box {
display: flex;
}
.QRcode-box {
z-index: 1;
display: none;
position: absolute;
top: 64px;
width: 140px;
height: 166px;
background-color: rgba(255, 255, 255, 1);
border-radius: 6px;
padding: 20px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.168627450980392);
flex-direction: column;
.QRcode {
width: 100px;
height: 100px;
margin-bottom: 4px;
}
.text {
color: #555555;
font-size: 14px;
}
}
}
}
}
.offer-box {
width: 240px;
// height: 214px;
background-color: #fff;
border: 1px solid #e9eef2;
border-radius: 10px;
// padding: 17px 10px;
overflow: hidden;
height: 64px;
padding: 15px 10px;
&.big {
height: 214px;
padding: 17px 10px;
}
&.small {
height: 64px;
padding: 15px 10px;
}
.item {
align-items: flex-start;
cursor: pointer;
margin-bottom: 19px;
.avatar {
width: 24px;
height: 24px;
margin-right: 8px;
border-radius: 50%;
background-size: contain;
}
.condition {
font-size: 12px;
color: #aaaaaa;
width: 180px;
}
.titletitle {
font-family: "ArialMT", "Arial", sans-serif;
font-weight: 400;
font-size: 13px;
color: #333333;
width: 180px;
}
&:hover .titletitle {
color: #000000;
}
}
}
}
}
.admission {
margin-bottom: 30px;
.admission-header {
margin-bottom: 24px;
display: inline-flex;
.admission-header-icon {
width: 91px;
height: 28px;
margin-right: 16px;
}
.admission-header-name {
font-family: "Roboto-Light", "Roboto Light", "Roboto", sans-serif;
font-weight: 200;
font-size: 16px;
line-height: 16px;
color: #555555;
align-items: flex-end;
}
}
.admission-list {
flex-wrap: wrap;
.admission-item {
width: calc((100% - 36px) / 4);
aspect-ratio: 291 / 103;
border-radius: 9px;
cursor: pointer;
overflow: hidden;
.admission-img {
display: block;
width: 100%;
height: 100%;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
&:not(:nth-child(4n)) {
margin-right: 12px;
}
&:not(:nth-last-child(-n + 4)) {
margin-bottom: 14px;
}
}
}
}
.matter {
align-items: flex-start;
.matter-content {
margin-right: 12px;
position: sticky;
z-index: 1;
.forum-sections-list {
position: relative;
flex: 1;
// height: 240px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
padding-left: 70px;
padding-top: 20px;
padding-bottom: 14px;
margin-bottom: 20px;
.img {
position: absolute;
top: -1px;
left: -1px;
width: 60px;
height: 100%;
}
.title {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 16px;
color: #000000;
margin-bottom: 16px;
}
.list {
.line {
flex-wrap: wrap;
.item {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 14px;
color: #333;
padding: 0 18px;
height: 32px;
background-color: rgba(246, 246, 246, 1);
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 16px;
cursor: pointer;
margin-bottom: 10px;
&:not(:last-child) {
margin-right: 10px;
}
}
}
}
}
.item-box {
margin-bottom: 12px;
}
}
.sidebar {
position: sticky;
// &.fixed {
// position: fixed;
// right: calc((100% - 1200px) / 2);
// bottom: 10px;
// }
.ad-item {
display: block;
width: 291px;
height: 220px;
margin-bottom: 12px;
cursor: pointer;
img {
width: 291px;
height: 220px;
border-radius: 10px;
}
}
.side-box {
width: 291px;
padding: 17px 10px 10px;
margin-bottom: 12px;
width: 291px;
border-radius: 10px;
&.offer-side-box {
background: linear-gradient(154.12772232deg, #c7edf2 1%, #d3f2f5 100%);
}
&.vote-side-box {
background: linear-gradient(151.77562139deg, #c6f4d9 1%, #d9f7e5 100%);
}
&.interviewexperience-side-box {
background: linear-gradient(158.64328877deg, #d3e1fb 1%, #dee6f9 100%);
}
}
}
}
}
@media screen and (max-width: 910px) {
#appIndex .header-content-box .header-content-left {
width: 100%;
}
#appIndex .header-content-box .header-content-left .header-left-bottom-box .list {
margin-right: 15px;
}
#appIndex .header-content-box .header-content-right {
display: none;
}
#appIndex .header-content-box .header-content-left .topic-and-selectives .topic-box .topic-head .people .right {
display: none;
}
}
@media screen and (max-width: 768px) {
.head-top {
.input-box {
width: inherit;
height: inherit;
background: none;
border: none;
padding: 5px;
.placeholder {
display: none;
}
.input {
display: none;
}
.icon {
margin-left: 0;
}
}
.post-list {
display: none !important;
}
.sign-in {
display: none !important;
}
}
#appIndex {
width: 100%;
padding: 0 10px;
.admission {
.admission-list {
flex-wrap: nowrap;
overflow-x: auto;
.admission-item {
flex-shrink: 0;
width: auto;
height: 80px;
margin-right: 12px;
&:not(:nth-last-child(-n + 4)) {
margin-bottom: 5px;
}
img {
width: 100%;
height: auto;
}
}
}
}
.matter {
flex-direction: column;
.matter-content {
width: 100%;
margin-right: 0;
.forum-sections-list {
width: 100%;
height: auto;
padding: 10px;
.img {
display: none;
}
.list {
.line {
flex-wrap: wrap;
margin-bottom: 0 !important;
height: auto;
.item {
margin-bottom: 10px;
}
}
}
}
}
.sidebar {
display: none;
}
}
.pop-list {
display: block;
}
}
}
@media screen and (max-width: 620px) {
.head-top {
width: 100% !important;
padding: 0 10px;
margin: 10px auto !important;
flex-wrap: wrap;
.input-box {
display: none !important;
}
.post-list {
display: none !important;
}
.sign-in {
display: none !important;
}
}
#appIndex {
width: 100%;
padding: 0 10px;
.header-content-box {
flex-direction: column;
.header-content-left {
width: 100%;
.adv-list {
display: none;
}
.topic-and-selectives {
flex-direction: column;
.topic-box {
width: 100%;
margin-right: 0;
margin-bottom: 10px;
height: auto;
}
.selectives-box {
width: 100%;
height: auto;
.list .item {
width: 100%;
.text {
width: auto;
}
}
}
.head-top {
width: max-content !important;
margin-left: 0 !important;
}
}
.header-left-bottom-box {
width: 100%;
height: auto;
flex-direction: column;
padding: 10px;
.adv {
margin-right: 0;
margin-bottom: 10px;
width: 100%;
height: auto;
.adv-icon {
width: 100%;
height: auto;
}
}
.list {
width: 100%;
margin-right: 0;
margin-bottom: 0;
.item {
// margin-bottom: 12px;
.text {
width: auto;
}
}
}
}
}
.header-content-right {
display: none;
}
}
}
}
.pop-list {
width: 100%;
// max-width: 470px;
// min-height: 90px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 20px;
padding: 6px;
margin: 0 auto 20px;
display: none;
.list {
background-color: rgba(246, 246, 246, 1);
border-radius: 15px;
width: 100%;
display: flex;
align-items: center;
.item {
display: flex;
flex-direction: column;
justify-content: center;
height: 55px;
&:nth-of-type(1) {
flex: 95;
}
&:nth-of-type(2) {
flex: 114;
}
&:nth-of-type(3) {
flex: 109;
}
&:nth-of-type(4) {
flex: 140;
}
&:not(:last-of-type) {
border-right: 1px dotted #d7d7d7;
}
.top {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
color: #000000;
font-size: 16px;
line-height: 26px;
text-align: center;
}
.bottom {
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
color: #555555;
font-size: 14px;
text-align: center;
}
}
}
}