兼容header
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 4s

This commit is contained in:
2026-04-10 15:18:53 +08:00
parent 9748a3008e
commit 93a72c7826
11 changed files with 57 additions and 429 deletions

View File

@@ -184,7 +184,36 @@
</div> </div>
</div> </div>
</div> </div>
<div style="width: 100vw;height: 64px;"></div>
<script> <script>
//产品列表在hover复位tabs选择
const productNavContainer = document.querySelector('.header-nav-item:first-child');
if (productNavContainer) {
productNavContainer.addEventListener('mouseleave', () => {
// 延迟执行,确保下拉菜单已经隐藏
setTimeout(() => {
const tabs = document.querySelectorAll('.header-tab-item');
const contents = document.querySelectorAll('.header-tab-content');
// 重置到第一个tab
if (tabs.length > 0 && tabs[0]) {
tabs.forEach(tab => tab.classList.remove('active'));
contents.forEach(content => content.classList.remove('active'));
tabs[0].classList.add('active');
const firstContentId = tabs[0].getAttribute('data-tab');
const firstContent = document.getElementById(firstContentId);
if (firstContent) firstContent.classList.add('active');
}
}, 350);
});
}
const tabItems = document.querySelectorAll('.header-tab-item'); const tabItems = document.querySelectorAll('.header-tab-item');
const tabContents = document.querySelectorAll('.header-tab-content'); const tabContents = document.querySelectorAll('.header-tab-content');

View File

@@ -1,6 +1,6 @@
{extend name="public/base" /} {extend name="public/base" /}
{block name="style"} {block name="style"}
<!--<link rel="stylesheet" href="__CSS__/topic_laptop/header.css">--> <link rel="stylesheet" href="__CSS__/topic_laptop/header.css">
<link rel="stylesheet" href="__CSS__/before-after.min.css"> <link rel="stylesheet" href="__CSS__/before-after.min.css">
<link rel="stylesheet" href="__CSS__/topic_laptop/swiper.css"> <link rel="stylesheet" href="__CSS__/topic_laptop/swiper.css">
<link rel="stylesheet" href="__CSS__/topic_laptop/footer.css"> <link rel="stylesheet" href="__CSS__/topic_laptop/footer.css">
@@ -52,7 +52,7 @@
{/block} {/block}
{block name="main"} {block name="main"}
{notempty name="data.top_focus_images"} {notempty name="data.top_focus_images"}
<div class="swiper-container auto-swiper-container" style="margin-top:60px;"> <div class="swiper-container auto-swiper-container">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
{volist name="data.top_focus_images" id="tfi"} {volist name="data.top_focus_images" id="tfi"}
<div class="swiper-slide auto-swiper-slide"> <div class="swiper-slide auto-swiper-slide">

View File

@@ -17,9 +17,12 @@ a {
position: fixed; position: fixed;
top:0; top:0;
z-index: 999; z-index: 999;
max-width: 1920px;
width: 100%; width: 100%;
background: #fff; background: #fff;
font-size: 16px; font-size: 16px;
box-sizing: border-box;
height: 64px;
} }
/* 导航外容器1920px宽居中 */ /* 导航外容器1920px宽居中 */
.header-nav-outer { .header-nav-outer {
@@ -31,6 +34,7 @@ a {
background: #fff; background: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
/* margin: 0 auto; */
} }
/* 顶部导航栏内容区带左右边距外框1920px */ /* 顶部导航栏内容区带左右边距外框1920px */

View File

@@ -17,7 +17,6 @@
width: 100%; width: 100%;
height: auto; height: auto;
position: relative; position: relative;
margin-top: 64px;
} }
.orico_Page_index .pageMain .bannerswiper .swiper-slide img { .orico_Page_index .pageMain .bannerswiper .swiper-slide img {

View File

@@ -36,7 +36,7 @@
flex-direction: column; flex-direction: column;
padding: 2.5rem 0 1.375rem 0; padding: 2.5rem 0 1.375rem 0;
position: relative; position: relative;
margin-top: 3%; /* margin-top: 3%; */
} }
.orico_Page_prdetail .oriprdetail .product_address { .orico_Page_prdetail .oriprdetail .product_address {
width: 70%; width: 70%;

View File

@@ -27,7 +27,7 @@
} }
.orico_Page_subcategory .pageMain { .orico_Page_subcategory .pageMain {
width: 85%; width: 85%;
padding: 7.5rem 0 10px; padding: 54px 0 10px;
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@@ -1,406 +1,13 @@
@charset "UTF-8"; .header {
/* 全局文字最小尺寸兜底 */ max-width: 100% !important;
.header-PC { width: 100% !important;
width: 100%;
height: 60px;
background: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;
position: fixed;
top: 0;
z-index: 100;
} }
.header-PC * { .header-nav-outer {
min-font-size: 16px !important; /* 强制最小16px */ max-width: 1920px;
box-sizing: border-box; width: 100%;
margin:auto 0 !important;
} }
.header-PC #header {
margin: 0 auto;
height: 60px; /* 0.6rem*100=60px */
max-width: var(--max-width);
/* position: fixed;
top: 0; */
display: flex;
flex-direction: row;
align-items: center;
z-index: 999;
background: white;
color: black;
width: 100%;
font-size: 16px; /* 基础字号16px */
}
.header-PC #header .nav1 {
position: relative;
width: 20%;
}
.header-PC #header .nav1 img {
width: 45%;
margin-left: 40%;
}
.header-PC #header .nav2 {
position: relative;
width: 60%;
}
.header-PC #header .nav2 .navItem {
font-size: 16px; /* 强制16px */
position: relative;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
justify-content: center;
width: 12.5%;
height: 60px; /* 0.6rem*100=60px */
text-align: center;
float: left;
text-decoration: none;
transition: all 0.3s ease;
-webkit-transition: all 0.5s ease;
}
.header-PC #header .nav2 .navItem a {
padding-right: 5px; /* 0.05rem*100=5px */
padding-left: 20px; /* 0.2rem*100=20px */
text-decoration: none;
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
text-wrap: nowrap;
font-size: 16px; /* 确保16px */
}
.header-PC #header .nav2 .navItem .downimg {
height: 12px; /* 0.12rem*100=12px */
}
.header-PC #header .nav2 .navItem .navItemConten {
width: 100%;
z-index: 999;
background-color: #f2f2f2;
max-height: 660px; /* 6.6rem*100=660px */
box-shadow: 3px 5px 60px -20px #88909a; /* 0.03/0.05/0.6/-0.2rem 转px */
position: fixed;
border: 1px solid lightgray;
top: 60px; /* 0.6rem*100=60px */
transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
left: 0;
display: none;
font-size: 16px; /* 基础字号16px */
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyleft {
float: left;
text-align: center;
width: 20%;
max-height: 660px; /* 6.6rem*100=660px */
font-size: 16px; /* 强制16px */
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyleft li {
cursor: pointer;
zoom: 1;
clear: both;
border: 1px solid transparent;
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyleft li a {
line-height: 44px; /* 0.44rem*100=44px */
color: #656a6d;
font-size: 16px; /* 确保16px */
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyleft li a:hover {
color: #004bfa;
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyleft li.it_active {
border-color: #dddddd;
background-color: #ffffff;
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyright {
max-height: 660px; /* 6.6rem*100=660px */
min-height: 460px; /* 4.6rem*100=460px */
overflow-y: auto;
border-left: 1px solid #dddddd;
font-weight: normal;
background-color: #fff;
margin: 0 auto;
box-shadow: -3px 0 0px #f3f3f3; /* -0.03rem*100=-3px */
text-align: left;
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyright .nav_cyrightit dt {
font-size: 16px; /* 原0.14rem=14px → 提升至16px */
line-height: 16px; /* 0.16rem*100=16px */
margin-inline-start: 20px; /* 0.2rem*100=20px */
font-weight: 600;
border-bottom: 1px solid rgba(225, 225, 225, 0.5);
padding-bottom: 13px; /* 0.13rem*100=13px */
padding-top: 16px; /* 0.16rem*100=16px */
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyright .nav_cyrightit dt img {
height: 16px; /* 0.16rem*100=16px */
max-width: 100%;
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyright .nav_cyrightit dt a {
color: #333;
text-decoration: none;
word-break: keep-all;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
text-wrap: nowrap;
font-size: 16px; /* 确保16px */
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyright .nav_cyrightit dd {
font-size: 16px; /* 原0.14rem=14px → 提升至16px */
line-height: 40px; /* 0.4rem*100=40px */
padding-top: 0vw;
font-weight: 100;
display: inline-block;
margin-right: 3%;
margin-inline-start: 40px; /* 0.4rem*100=40px */
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyright .nav_cyrightit dd a {
font-size: 16px; /* 确保16px */
}
.header-PC #header .nav2 .navItem .navItemConten .navItem_cyright .nav_cyrightit dd a:hover {
color: #004bf9;
font-weight: 600;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-transition: all 0.2s linear;
}
.header-PC #header .nav2 .navItem .navItemConten.active {
max-height: 660px; /* 6.6rem*100=660px */
opacity: 1;
}
.header-PC #header .nav2 .navItem .navItemConten1 {
background-color: #fff;
color: black;
position: absolute;
top: 60px; /* 0.6rem*100=60px */
left: 20px; /* 0.2rem*100=20px */
width: auto;
height: auto;
z-index: 9999;
border-radius: 5px; /* 0.05rem*100=5px */
box-shadow: 0 0 1px 0 #88909a; /* 0.01rem*100=1px */
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 8px 0; /* 0.08rem*100=8px */
font-size: 16px; /* 基础字号16px */
}
.header-PC #header .nav2 .navItem .navItemConten1 li {
color: #fff;
float: left;
text-align: center;
line-height: 24px; /* 0.24rem*100=24px */
padding: 8px 32px; /* 0.08/0.32rem*100=8/32px */
display: list-item;
}
.header-PC #header .nav2 .navItem .navItemConten1 li a {
cursor: pointer;
padding-left: 0;
white-space: nowrap;
font-size: 16px; /* 确保16px */
}
.header-PC #header .nav2 .navItem > a.active,
.header-PC #header .nav2 .navItem .navItemConten1 li a:hover {
color: #004bfa;
}
.header-PC #header .nav3 {
position: relative;
width: 20%;
background-color: transparent;
display: flex;
align-items: center;
cursor: pointer;
font-size: 16px; /* 基础字号16px */
}
.header-PC #header .nav3 .searchimg {
margin-left: 10%;
}
.header-PC #header .nav3 .storetopbt {
background: #004cfa;
color: #fff;
padding: 0 15px; /* 0.15rem*100=15px */
border-radius: 20px; /* 0.2rem*100=20px */
height: 38px; /* 0.38rem*100=38px */
line-height: 40px; /* 0.4rem*100=40px */
margin-left: 15%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
font-size: 16px; /* 强制16px */
}
.header-PC #header .nav3 .storetopbt .storeImgico {
width: 20px; /* 0.2rem*100=20px */
margin-right: 8px; /* 0.08rem*100=8px */
}
.header-PC #header .nav3 .choesCountry {
position: relative;
margin-left: 15%;
display: flex;
}
.header-PC #header .nav3 .choesCountry .topCountry {
display: none;
width: 340px; /* 3.4rem*100=340px */
background-color: white;
/* position: fixed; */
position: absolute;
right: -150px;
top: 50px; /* 0.8rem*100=80px */
border-radius: 15px; /* 0.15rem*100=15px */
box-shadow: 2px 2px 10px 1px #88909a; /* 0.02/0.02/0.1/0.01rem 转px */
font-size: 16px; /* 基础字号16px */
}
.header-PC #header .nav3 .choesCountry .topCountry li {
width: 100%;
height: 50px; /* 0.5rem*100=50px */
line-height: 50px; /* 0.5rem*100=50px */
text-align: center;
display: flex;
}
.header-PC #header .nav3 .choesCountry .topCountry li .countryName {
width: 70%;
text-align: left;
margin-left: 10px; /* 0.1rem*100=10px */
font-size: 16px; /* 强制16px */
}
.header-PC #header .nav3 .choesCountry .topCountry li .cico {
width: 18%;
margin-left: 0;
}
.header-PC #header .nav3 .choesCountry .topCountry li .cico .countryimg {
margin-left: 0;
margin-left: 20px; /* 0.2rem*100=20px */
margin-top: 15px; /* 0.15rem*100=15px */
vertical-align: top;
}
.header-PC #header .nav3 .choesCountry .topCountry li.closec {
display: flex;
flex-direction: row;
justify-content: end;
height: 30px; /* 0.3rem*100=30px */
}
.header-PC #header .nav3 .choesCountry .topCountry .closecountrybt {
color: #aaa;
margin-top: -5px; /* 0.05rem*100=5px */
cursor: pointer;
height: 20px; /* 0.2rem*100=20px */
width: 20px; /* 0.2rem*100=20px */
margin-right: 10px; /* 0.1rem*100=10px */
font-size: 16px; /* 确保关闭按钮文字16px */
}
.header-PC .searchmodalMian {
position: fixed;
z-index: 999;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
z-index: 998;
display: none;
}
.header-PC .searchmodalMian .searchmodalct {
background-color: #fff;
padding: 20px; /* 0.2rem*100=20px */
border-radius: 20px; /* 0.2rem*100=20px */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 0.04/0.08rem 转px */
border: 1px solid rgba(0, 0, 0, 0.2);
position: fixed;
right: 2%;
width: 33%;
top: 80px; /* 0.8rem*100=80px */
height: 80%;
overflow-y: auto;
z-index: 998;
font-size: 16px; /* 基础字号16px */
}
.header-PC .searchmodalMian .searchmodalct .close-btn {
color: #aaa;
float: right;
font-size: 24px; /* 0.24rem*100=24px */
cursor: pointer;
}
.header-PC .searchmodalMian .searchmodalct #serrchinput {
margin-left: 10%;
margin-top: 5%;
width: 80%;
height: 44px; /* 0.44rem*100=44px */
border: 1px solid grey;
border-radius: 22px; /* 0.22rem*100=22px */
background-position: 95% 50%;
padding-left: 5%;
font-size: 16px; /* 输入框文字16px */
}
.header-PC .searchmodalMian .searchmodalct .searchhistory,
.header-PC .searchmodalMian .searchmodalct .popProduct {
margin-top: 5%;
margin-left: 10%;
width: 80%;
display: flex;
position: relative;
}
.header-PC .searchmodalMian .searchmodalct .searchhistory .h_title,
.header-PC .searchmodalMian .searchmodalct .popProduct .h_title {
position: absolute;
left: 0;
top: 1%;
font-size: 16px; /* 保持16px */
color: #989898;
}
.header-PC .searchmodalMian .searchmodalct .searchhistory ul,
.header-PC .searchmodalMian .searchmodalct .popProduct ul {
margin-top: 10%;
margin-left: 1%;
}
.header-PC .searchmodalMian .searchmodalct .popProduct .popmain{
width: 100%;
}
.header-PC .searchmodalMian .searchmodalct .searchhistory .popmain,
.header-PC .searchmodalMian .searchmodalct .popProduct .popmain {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.header-PC .searchmodalMian .searchmodalct .searchhistory .popmain .popitem,
.header-PC .searchmodalMian .searchmodalct .popProduct .popmain .popitem {
text-align: center;
margin-top: 7%;
margin-left: 1%;
display: flex;
flex-direction: column;
justify-content: center;
width: 30%;
align-items: center;
overflow: hidden;
}
.header-PC .searchmodalMian .searchmodalct .searchhistory .popmain .popitem .popimg,
.header-PC .searchmodalMian .searchmodalct .popProduct .popmain .popitem .popimg {
width: 115px; /* 1.15rem*100=115px */
height: 115px; /* 1.15rem*100=115px */
margin: 0 auto;
}
.header-PC .searchmodalMian .searchmodalct .searchhistory .popmain .popitem .productName,
.header-PC .searchmodalMian .searchmodalct .popProduct .popmain .popitem .productName {
font-weight: 600;
display: -webkit-box;
-webkit-line-clamp: 1;
text-overflow: ellipsis;
font-size: 16px; /* 原0.128rem=12.8px → 提升至16px */
margin-top: 10%;
}
.header-PC .searchmodalMian .searchmodalct .popProduct .popmain .popitem .productName
{
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
font-size: 16px; /* 原14px → 提升至16px */
}
.header-PC .searchmodalMian .searchmodalct .popProduct .popmain .popitem .produc-dec{
font-size: 16px; /* 原10px → 提升至16px */
color: #000000;
margin-top: 1%;
}

View File

@@ -9,13 +9,6 @@ body {
overflow-x: hidden; overflow-x: hidden;
scroll-behavior: smooth !important; scroll-behavior: smooth !important;
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
/* padding: 0 !important;
margin:0 !important; */
/* max-width:100% !important;
width: 100vw !important;
margin:0 auto; */
/* max-width:100vw !important */
/* margin:0 auto !important; */
} }
/* 当视口宽度大于1920px时生效 */ /* 当视口宽度大于1920px时生效 */
@media screen and (min-width: 1920px) { @media screen and (min-width: 1920px) {
@@ -39,7 +32,3 @@ body {
transform 1.2s ease-in-out, transform 1.2s ease-in-out,
visibility 1.2s ease-in-out; visibility 1.2s ease-in-out;
} }
/* 18-19号防卡顿延迟19号动画 */
/* [data-order="19"] {
transition: all 0.3s ease-out 0.2s !important;
} */

View File

@@ -63,12 +63,12 @@ a {
width: 100%; width: 100%;
height: clamp(2.5rem, 5vw, 15rem); height: clamp(2.5rem, 5vw, 15rem);
} }
.header { /* .header {
width: 100%; width: 100%;
background: #fff; background: #fff;
height: 60px; height: 60px;
} } */
.header-img { /* .header-img {
margin: 0 auto; margin: 0 auto;
width: 90%; width: 90%;
display: flex; display: flex;
@@ -76,4 +76,4 @@ a {
padding-top: 0.5rem; padding-top: 0.5rem;
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
} } */