fix(样式): 修复移动端布局问题并优化样式

修复移动端搜索页面的布局问题,优化响应式设计
调整头部导航栏的z-index防止遮挡
统一处理签到组件的显示逻辑
修复搜索推荐框宽度问题
优化媒体查询断点设置
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-12-24 18:54:19 +08:00
parent 826700970d
commit f2469a1a3b
12 changed files with 445 additions and 308 deletions

View File

@@ -1301,6 +1301,27 @@
min-width: inherit !important;
}
}
@media screen and (max-width: 850px) {
#details .matter .matter-left .action-bar .action-bar-item:not(:last-child) {
margin-right: 40px;
}
.head-top .input-box {
width: inherit;
height: inherit;
background: none;
border: none;
padding: 5px;
}
.head-top .input-box .placeholder {
display: none;
}
.head-top .input-box .input {
display: none;
}
.head-top .input-box .icon {
margin-left: 0;
}
}
@media screen and (max-width: 768px) {
header.page-header {
display: none !important;

View File

@@ -1552,6 +1552,33 @@
}
}
@media screen and (max-width: 850px) {
#details .matter .matter-left .action-bar .action-bar-item:not(:last-child) {
margin-right: 40px;
}
.head-top {
.input-box {
width: inherit;
height: inherit;
background: none;
border: none;
padding: 5px;
.placeholder {
display: none;
}
.input {
display: none;
}
.icon {
margin-left: 0;
}
}
}
}
// 媒体查询 最大宽度 850px 时
@media screen and (max-width: 768px) {
header.page-header {

View File

@@ -17,6 +17,9 @@
}
#appIndex .header-content-box .header-content-left .adv-list .adv-item {
width: calc((100% - 12px) / 2);
height: 60px;
display: flex;
align-items: center;
}
#appIndex .header-content-box .header-content-left .adv-list .adv-item:not(:last-child) {
margin-right: 12px;
@@ -148,7 +151,7 @@
color: #000000;
}
#appIndex .header-content-box .header-content-left .topic-and-selectives .selectives-box {
width: calc((100% - 12px) * 0.662);
width: calc((100% - 12px) * 0.675);
height: 320px;
background-color: #ffffff;
border: 1px solid #e9eef2;
@@ -222,8 +225,6 @@
}
#appIndex .header-content-box .header-content-left .header-left-bottom-box .list .item {
height: 20px;
display: flex;
align-items: center;
}
#appIndex .header-content-box .header-content-left .header-left-bottom-box .list .item:not(:last-of-type) {
margin-bottom: 12px;
@@ -234,12 +235,10 @@
margin-right: 10px;
background: #30b0d5;
border-radius: 50%;
flex-shrink: 0;
}
#appIndex .header-content-box .header-content-left .header-left-bottom-box .list .item .text {
cursor: pointer;
flex: 1;
min-width: 0;
width: auto;
text-decoration: none;
color: #555;
}
@@ -511,12 +510,12 @@
}
#appIndex .matter .matter-content .forum-sections-list {
position: relative;
flex: 1;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;
padding-left: 70px;
padding-top: 20px;
padding-right: 2px;
padding-bottom: 14px;
margin-bottom: 20px;
}
@@ -588,7 +587,95 @@
#appIndex .matter .sidebar .side-box.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;
}
.head-top .input-box .placeholder {
display: none;
}
.head-top .input-box .input {
display: none;
}
.head-top .input-box .icon {
margin-left: 0;
}
.head-top .post-list {
display: none !important;
}
.head-top .sign-in {
display: none !important;
}
#appIndex {
width: 100%;
padding: 0 10px;
}
#appIndex .admission .admission-list {
flex-wrap: nowrap;
overflow-x: auto;
}
#appIndex .admission .admission-list .admission-item {
flex-shrink: 0;
width: auto;
height: 80px;
margin-right: 12px;
}
#appIndex .admission .admission-list .admission-item:not(:nth-last-child(-n + 4)) {
margin-bottom: 5px;
}
#appIndex .admission .admission-list .admission-item img {
width: 100%;
height: auto;
}
#appIndex .matter {
flex-direction: column;
}
#appIndex .matter .matter-content {
width: 100%;
margin-right: 0;
}
#appIndex .matter .matter-content .forum-sections-list {
width: 100%;
height: auto;
padding: 10px;
}
#appIndex .matter .matter-content .forum-sections-list .img {
display: none;
}
#appIndex .matter .matter-content .forum-sections-list .list .line {
flex-wrap: wrap;
margin-bottom: 0 !important;
height: auto;
}
#appIndex .matter .matter-content .forum-sections-list .list .line .item {
margin-bottom: 10px;
}
#appIndex .matter .sidebar {
display: none;
}
#appIndex .pop-list {
display: block;
}
}
@media screen and (max-width: 620px) {
.head-top {
width: 100% !important;
padding: 0 10px;
@@ -667,52 +754,6 @@
#appIndex .header-content-box .header-content-right {
display: none;
}
#appIndex .admission .admission-list {
flex-wrap: nowrap;
overflow-x: auto;
}
#appIndex .admission .admission-list .admission-item {
flex-shrink: 0;
width: auto;
height: 80px;
margin-right: 12px;
}
#appIndex .admission .admission-list .admission-item:not(:nth-last-child(-n + 4)) {
margin-bottom: 5px;
}
#appIndex .admission .admission-list .admission-item img {
width: 100%;
height: auto;
}
#appIndex .pop-list {
display: block;
}
#appIndex .matter {
flex-direction: column;
}
#appIndex .matter .matter-content {
width: 100%;
margin-right: 0;
}
#appIndex .matter .matter-content .forum-sections-list {
width: 100%;
height: auto;
padding: 10px;
}
#appIndex .matter .matter-content .forum-sections-list .img {
display: none;
}
#appIndex .matter .matter-content .forum-sections-list .list .line {
flex-wrap: wrap;
margin-bottom: 0 !important;
height: auto;
}
#appIndex .matter .matter-content .forum-sections-list .list .line .item {
margin-bottom: 10px;
}
#appIndex .matter .sidebar {
display: none;
}
}
.pop-list {
width: 100%;
@@ -734,7 +775,7 @@
display: flex;
flex-direction: column;
justify-content: center;
height: 70px;
height: 55px;
}
.pop-list .list .item:nth-of-type(1) {
flex: 95;

View File

@@ -18,6 +18,9 @@
.adv-item {
width: calc((100% - 12px) / 2);
height: 60px;
display: flex;
align-items: center;
&:not(:last-child) {
margin-right: 12px;
@@ -183,7 +186,7 @@
}
.selectives-box {
width: calc((100% - 12px) * 0.662);
width: calc((100% - 12px) * 0.675);
height: 320px;
background-color: #ffffff;
border: 1px solid #e9eef2;
@@ -233,7 +236,7 @@
.header-left-bottom-box {
width: 100%;
height: auto;
background-color: rgba(255, 255, 255, 1);
background-color: rgb(255, 255, 255);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
padding: 12px;
@@ -269,8 +272,6 @@
.item {
height: 20px;
display: flex;
align-items: center;
&:not(:last-of-type) {
margin-bottom: 12px;
@@ -282,13 +283,11 @@
margin-right: 10px;
background: #30b0d5;
border-radius: 50%;
flex-shrink: 0;
}
.text {
cursor: pointer;
flex: 1;
min-width: 0;
width: auto;
text-decoration: none;
color: #555;
@@ -625,14 +624,13 @@
.forum-sections-list {
position: relative;
// flex: 1;
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-right: 2px;
padding-bottom: 14px;
margin-bottom: 20px;
@@ -728,7 +726,121 @@
}
}
@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;
@@ -827,68 +939,6 @@
display: none;
}
}
.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;
}
}
}
}
.pop-list {
display: block;
}
.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;
}
}
}
}
@@ -908,7 +958,6 @@
background-color: rgba(246, 246, 246, 1);
border-radius: 15px;
width: 100%;
// height: 100%;
display: flex;
align-items: center;
@@ -916,7 +965,7 @@
display: flex;
flex-direction: column;
justify-content: center;
height: 70px;
height: 55px;
&:nth-of-type(1) {
flex: 95;

File diff suppressed because one or more lines are too long

View File

@@ -1791,6 +1791,10 @@ body {
display: none;
padding: 5px;
}
.head-top .head-pop.head-pop-show .sign-in {
display: flex !important;
margin: 20px auto;
}
.hot-tag {
background-color: #ffffff;
border: 1px solid #e9eef2;

View File

@@ -2156,6 +2156,13 @@ body {
display: none;
padding: 5px;
}
.head-pop.head-pop-show {
.sign-in {
display: flex !important;
margin: 20px auto;
}
}
}
.hot-tag {

View File

@@ -218,6 +218,7 @@
}
#search .search-no .recommend-box .hot-box {
width: 100%;
min-width: 0;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;
@@ -248,7 +249,8 @@
margin-right: 5px;
}
#search .search-no .recommend-box .read-box {
width: 291px;
width: 100%;
min-width: 0;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;

View File

@@ -267,6 +267,7 @@
.hot-box {
// width: 291px;
width: 100%;
min-width: 0;
// height: 365px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
@@ -302,7 +303,8 @@
}
.read-box {
width: 291px;
width: 100%;
min-width: 0;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;