From 7b9e348cf690ca778ca376184b30e07f1c6fe297 Mon Sep 17 00:00:00 2001 From: liqian <735273025@qq.com> Date: Wed, 3 Dec 2025 17:03:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=87=E4=BB=BD=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/topic_power_prodline/index.html | 69 ++-- .../css/topic_power_prodline/advantage.css | 295 +++----------- .../css/topic_power_prodline/advantage1.css | 143 ------- .../mobile/css/topic_power_prodline/nav.css | 109 ++--- .../mobile/css/topic_power_prodline/nav1.css | 43 -- .../css/topic_power_prodline/product.css | 247 +++--------- .../css/topic_power_prodline/product1.css | 149 ------- .../css/topic_power_prodline/product_list.css | 374 +++++------------- .../topic_power_prodline/product_list1.css | 124 ------ .../css/topic_power_prodline/swiper.css | 2 +- .../css/topic_power_prodline/swiper1.css | 75 ---- 11 files changed, 288 insertions(+), 1342 deletions(-) delete mode 100644 public/static/index/mobile/css/topic_power_prodline/advantage1.css delete mode 100644 public/static/index/mobile/css/topic_power_prodline/nav1.css delete mode 100644 public/static/index/mobile/css/topic_power_prodline/product1.css delete mode 100644 public/static/index/mobile/css/topic_power_prodline/product_list1.css delete mode 100644 public/static/index/mobile/css/topic_power_prodline/swiper1.css diff --git a/app/index/view/mobile/topic_power_prodline/index.html b/app/index/view/mobile/topic_power_prodline/index.html index 7edd2ff6..54565edf 100644 --- a/app/index/view/mobile/topic_power_prodline/index.html +++ b/app/index/view/mobile/topic_power_prodline/index.html @@ -2,34 +2,31 @@ {block name="style"} + (function (doc, win) { + var docEl = doc.documentElement; + var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'; + + function setRootFontSize() { + var clientWidth = docEl.clientWidth; + if (!clientWidth) return; + var fontSize = clientWidth / 7.5; // 750px/7.5=100px,375px/7.5=50px + // 直接修改内联样式,优先级最高 + docEl.setAttribute('style', 'font-size: ' + fontSize + 'px !important;'); + } + + setRootFontSize(); + win.addEventListener(resizeEvt, setRootFontSize); + doc.addEventListener('DOMContentLoaded', setRootFontSize); + })(document, window); + - - - + + + - - + + @@ -298,28 +295,6 @@ console.log("内联设置的 font-size:", document.documentElement.style.fontSiz {assign name="dc_second_section" value=":array_splice($data.desktop_charger, 0, 2)" /} {notempty name="dc_second_section"} - - -
{volist name="dc_second_section" id="dcs"} diff --git a/public/static/index/mobile/css/topic_power_prodline/advantage.css b/public/static/index/mobile/css/topic_power_prodline/advantage.css index 665d81f8..a5197bbc 100644 --- a/public/static/index/mobile/css/topic_power_prodline/advantage.css +++ b/public/static/index/mobile/css/topic_power_prodline/advantage.css @@ -2,56 +2,64 @@ .advantage-section { width: 93.5%; margin: 0 auto; - padding: clamp(4rem, 5vw, 6rem) 0 clamp(1.8rem, 3vw, 3rem) 0; + padding-top:0.99rem; position: relative; z-index: 1; height: auto !important; min-height: auto !important; + margin-bottom: 0.51rem; } /* 标题容器:恢复原有居中样式 */ .advantage-section__title { - font-size: clamp(2rem, 3vw, 2.4rem); + font-size: 0.46rem; font-weight: 700; text-align: center; - color: #333; - line-height: 1.2; + color: #101010; margin:0 auto; - margin-bottom: clamp(1.5rem, 2vw, 2.5rem); + margin-bottom: 0.51rem; width: 80%; - } -/* 列表容器:强制设置高度相关属性,确保内容正常显示 */ +/* 列表容器:改为wrap换行,实现2+3布局,间距设为0.08rem(8px) */ .advantage-section__list { display: flex; - justify-content: center; + justify-content: flex-start; /* 左对齐排列 */ align-items: flex-start; - gap: clamp(0.1rem, 0.3vw, 0.8rem); + gap: 0.08rem; /* 列间距:设计稿8px=0.08rem */ + row-gap: 0.08rem; /* 行间距:设计稿8px=0.08rem */ width: 100% !important; - flex-wrap: nowrap; - overflow: visible !important; /* 改为visible确保内容显示 */ + flex-wrap: wrap; /* 允许换行 */ + overflow: visible !important; padding: 0 !important; - /* 强制设置高度相关属性 */ height: auto !important; - min-height: 1px !important; /* 确保容器至少有高度 */ - position: relative !important; /* 建立BFC */ + min-height: 1px !important; + position: relative !important; } -/* 卡片包裹容器:确保为块级元素并继承高度 */ +/* 卡片包裹容器:动态宽度控制 */ .advantage-card-wrap { display: block !important; - width: 100% !important; height: auto !important; min-height: 1px !important; } -/* 卡片核心:高度自适应内容 */ +/* 第一行2个卡片:宽度=(100% - 1个间距)/2 */ +.advantage-card-wrap:nth-child(1), +.advantage-card-wrap:nth-child(2) { + width: calc((100% - 0.08rem) / 2) !important; +} + +/* 第二行3个卡片:宽度=(100% - 2个间距)/3 */ +.advantage-card-wrap:nth-child(3), +.advantage-card-wrap:nth-child(4), +.advantage-card-wrap:nth-child(5) { + width: calc((100% - 2 * 0.08rem) / 3) !important; +} + +/* 卡片核心:宽度继承父容器,高度自适应 */ .advantage-card { - flex: 0 0 calc((100% - 4 * clamp(0.1rem, 0.3vw, 0.8rem)) / 5); - min-width: calc((100% - 4 * clamp(0.1rem, 0.3vw, 0.8rem)) / 5); - max-width: calc((100% - 4 * clamp(0.1rem, 0.3vw, 0.8rem)) / 5); - border-radius: 0.5rem; + width: 100% !important; overflow: hidden; box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1); transition: transform 0.3s ease; @@ -59,254 +67,77 @@ background: #fff; position: relative; z-index: 1; - height: auto !important; /* 高度自适应内容 */ + height: auto !important; display: flex; flex-direction: column; + border-radius: 0.1rem 0.1rem 0 0 !important; } -/* 图片容器:设置为1:1比例 */ +/* 图片容器:保持1:1比例 */ .advantage-card__img { width: 100%; - aspect-ratio: 1 / 1; /* 1:1图片比例 */ + aspect-ratio: 1 / 1; /* 1:1比例 */ object-fit: cover; background-color: #f9f9f9; display: block; flex-shrink: 0; } -/* 文字区域:flex垂直分布,确保标题和描述都垂直居中 */ +/* 文字区域:保持内边距和布局,内部间距也调整为0.08rem */ .advantage-card__content { width: 100%; - padding: clamp(1rem,3vw, 1.5rem); - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - flex-grow: 1; - gap: 4px; + padding: 0.4rem 0.23rem 0.31rem 0.2rem; /* 上下内边距 */ + gap: 0.08rem; /* 内部元素间距:设计稿8px=0.08rem */ } -/* 标题容器:水平居中+内部两端对齐,同时垂直居中 */ +/* 标题容器:间距设为0.08rem(8px) */ .advantage-card__heading-wrap { display: flex; align-items: center; justify-content: space-between; - gap: clamp(0.3rem, 0.5vw, 0.5rem); - width: 80%; + gap: 0.08rem; /* 设计稿8px=0.08rem */ + width: 100%; } -/* 卡片标题:居左显示 */ +/* 卡片标题:字体大小调整 */ .advantage-card__heading { - font-size: clamp(16px, 1.5vw, 32px); + font-size: 0.34rem; font-weight: 600; - color: #333; - line-height: 1.3; + color: #101010; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + white-space: nowrap; /* 强制不换行 */ + overflow: hidden; /* 超出隐藏 */ + text-overflow: ellipsis; /* 显示省略号 */ } -/* 卡片标题右侧箭头:自适应大小,与标题协调 */ +/* 描述文字样式 */ +.advantage-card__description { + font-size: 0.24rem; + color:#666666; + margin-top: 0.08rem; /* 与标题间距:设计稿8px=0.08rem */ + white-space: nowrap; /* 强制不换行 */ + overflow: hidden; /* 超出隐藏 */ + text-overflow: ellipsis; /* 显示省略号 */ +} + +/* 箭头大小 */ .card-arrow { - color: #409eff; transition: transform 0.3s ease; display: inline-flex; align-items: center; justify-content: center; - /* 箭头大小根据标题字体大小自适应 */ - width: clamp(1rem, 1.8vw, 1.5rem); - height: clamp(1rem, 1.8vw, 1.5rem); - font-size: clamp(0.7rem, 1.2vw, 1.1rem); - flex-shrink: 0; -} - -/* 卡片hover时箭头动画 */ -.advantage-card:hover .card-arrow { - transform: translateX(3px); -} - -/* 描述文字:水平+垂直居中,与标题容器对齐,设置最小高度统一占位 */ -.advantage-card__description { - font-size: clamp(10px, 1vw, 18px); - line-height: 1.2; - width: 80%; - color: #666666; - /* 强制固定2行显示 */ - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - overflow: hidden; - text-overflow: ellipsis; - /* 非webkit内核浏览器降级方案 */ - display: block; - height: calc(1.2em * 2); /* 行高 × 行数,确保高度刚好容纳2行 */ - /* 最小高度兜底,适配不同字体大小 */ - min-height: clamp(24px, 2.4vw, 43.2px); /* 1.2em×2换算,对应字体范围的最小/最大高度 */ - /* 防止内容溢出 */ - white-space: normal; - word-wrap: break-word; + width: 0.33rem; + height: 0.33rem; } /* 卡片hover效果 */ -.advantage-card:hover { +/* .advantage-card:hover { transform: scale(1.03); -} +} */ -/* 箭头容器:自适应尺寸 */ -.arrow { - position: relative; - /* 箭头尺寸跟随card-arrow自适应 */ - width: 100%; - height: 100%; -} - -/* 箭头线条基础样式:自适应粗细 */ -.arrow::before, -.arrow::after { - content: ''; - position: absolute; - background-color: #fff; - border-radius: clamp(0.05rem, 0.1vw, 0.1rem); - /* 线条粗细自适应 */ - height: clamp(0.08rem, 0.15vw, 0.12rem); -} - -/* 右箭头:自适应长度 */ -.arrow-right::before { - width: clamp(0.3rem, 0.7vw, 0.55rem); - top: 50%; - left: 0; - transform: translateY(-50%) rotate(45deg); - transform-origin: right center; -} - -.arrow-right::after { - width: clamp(0.3rem, 0.7vw, 0.55rem); - top: 50%; - left: 0; - transform: translateY(-50%) rotate(-45deg); - transform-origin: right center; -} - -/* 左箭头:自适应长度 */ -.arrow-left::before { - width: clamp(0.3rem, 0.7vw, 0.55rem); - top: 50%; - right: 0; - transform: translateY(-50%) rotate(-45deg); - transform-origin: left center; -} - -.arrow-left::after { - width: clamp(0.3rem, 0.7vw, 0.55rem); - top: 50%; - right: 0; - transform: translateY(-50%) rotate(45deg); - transform-origin: left center; -} - -/* 平板端和移动端统一布局:第一行2个,第二行3个 */ -@media (max-width: 1024px) { - /* 列表容器:flex布局+换行,左对齐确保排列规则,仅保留列间距 */ - .advantage-section__list { - display: flex !important; - flex-wrap: wrap !important; - justify-content: flex-start !important; - gap: clamp(0.3rem, 1.5vw, 0.8rem) !important; /* 列间距 */ - row-gap: clamp(0.5rem, 2vw, 1rem) !important; /* 行间距 */ - width: 100% !important; - height: auto !important; - overflow: visible !important; - padding: 0 !important; - } - - /* 卡片包裹容器:基础样式 */ - .advantage-card-wrap { - display: block !important; - height: auto !important; - min-height: 1px !important; - margin-bottom: 0 !important; /* 移除额外margin */ - } - - /* 第一行2个卡片:宽度=(100% - 1个间距)/2 */ - .advantage-card-wrap:nth-child(1), - .advantage-card-wrap:nth-child(2) { - width: calc((100% - clamp(0.3rem, 1.5vw, 0.8rem)) / 2) !important; - } - - /* 第二行3个卡片:宽度=(100% - 2个间距)/3 */ - .advantage-card-wrap:nth-child(3), - .advantage-card-wrap:nth-child(4), - .advantage-card-wrap:nth-child(5) { - width: calc((100% - 2 * clamp(0.3rem, 1.5vw, 0.8rem)) / 3) !important; - } - - /* 卡片核心:宽度继承父容器,高度自适应 */ - .advantage-card { - width: 100% !important; - min-width: 100% !important; - max-width: 100% !important; - flex: none !important; - height: auto !important; - display: flex; - flex-direction: column; - } - - .advantage-card__img { - aspect-ratio: 1 / 1; - } - - .advantage-card__content { - flex-grow: 1; - padding: clamp(1.2rem, 3vw, 2rem) 0; - } - - /* 平板端字体稍大 */ - .advantage-card__heading { - font-size: clamp(16px, 3vw, 20px); - } - - .advantage-card__description { - font-size: clamp(11px, 2vw, 18px); - min-height: clamp(24px, 4vw, 30px); - color:#666666; - } - - .card-arrow { - width: clamp(1.17rem, 2.5vw, 2.2rem); - height: clamp(1.17rem, 2.5vw, 2.2rem); - } -} - -/* 移动端进一步优化间距 */ -@media (max-width: 767px) { - .advantage-section__list { - gap: clamp(0.2rem, 1vw, 0.5rem) !important; /* 进一步缩小列间距 */ - row-gap: clamp(0.3rem, 1.5vw, 0.8rem) !important; /* 进一步缩小行间距 */ - } - - .advantage-card-wrap:nth-child(1), - .advantage-card-wrap:nth-child(2) { - width: calc((100% - clamp(0.2rem, 1vw, 0.5rem)) / 2) !important; - } - - .advantage-card-wrap:nth-child(3), - .advantage-card-wrap:nth-child(4), - .advantage-card-wrap:nth-child(5) { - width: calc((100% - 2 * clamp(0.2rem, 1vw, 0.5rem)) / 3) !important; - } - - .advantage-card__description { - min-height: clamp(20px, 4.5vw, 26px); - color:#666666; - } -} - -/* 超小屏优化 */ -@media (max-width: 374px) { - .advantage-card__description { - min-height: clamp(18px, 4vw, 24px); - color:#666666; - font-size: clamp(11px, 2vw, 18px); - } +/* 箭头hover位移 */ +.advantage-card:hover .card-arrow { + transform: translateX(0.03rem); } \ No newline at end of file diff --git a/public/static/index/mobile/css/topic_power_prodline/advantage1.css b/public/static/index/mobile/css/topic_power_prodline/advantage1.css deleted file mode 100644 index a5197bbc..00000000 --- a/public/static/index/mobile/css/topic_power_prodline/advantage1.css +++ /dev/null @@ -1,143 +0,0 @@ -/* 核心模块:固定90%宽度(PC端),优化移动端边距 */ -.advantage-section { - width: 93.5%; - margin: 0 auto; - padding-top:0.99rem; - position: relative; - z-index: 1; - height: auto !important; - min-height: auto !important; - margin-bottom: 0.51rem; -} - -/* 标题容器:恢复原有居中样式 */ -.advantage-section__title { - font-size: 0.46rem; - font-weight: 700; - text-align: center; - color: #101010; - margin:0 auto; - margin-bottom: 0.51rem; - width: 80%; -} - -/* 列表容器:改为wrap换行,实现2+3布局,间距设为0.08rem(8px) */ -.advantage-section__list { - display: flex; - justify-content: flex-start; /* 左对齐排列 */ - align-items: flex-start; - gap: 0.08rem; /* 列间距:设计稿8px=0.08rem */ - row-gap: 0.08rem; /* 行间距:设计稿8px=0.08rem */ - width: 100% !important; - flex-wrap: wrap; /* 允许换行 */ - overflow: visible !important; - padding: 0 !important; - height: auto !important; - min-height: 1px !important; - position: relative !important; -} - -/* 卡片包裹容器:动态宽度控制 */ -.advantage-card-wrap { - display: block !important; - height: auto !important; - min-height: 1px !important; -} - -/* 第一行2个卡片:宽度=(100% - 1个间距)/2 */ -.advantage-card-wrap:nth-child(1), -.advantage-card-wrap:nth-child(2) { - width: calc((100% - 0.08rem) / 2) !important; -} - -/* 第二行3个卡片:宽度=(100% - 2个间距)/3 */ -.advantage-card-wrap:nth-child(3), -.advantage-card-wrap:nth-child(4), -.advantage-card-wrap:nth-child(5) { - width: calc((100% - 2 * 0.08rem) / 3) !important; -} - -/* 卡片核心:宽度继承父容器,高度自适应 */ -.advantage-card { - width: 100% !important; - overflow: hidden; - box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1); - transition: transform 0.3s ease; - cursor: pointer; - background: #fff; - position: relative; - z-index: 1; - height: auto !important; - display: flex; - flex-direction: column; - border-radius: 0.1rem 0.1rem 0 0 !important; -} - -/* 图片容器:保持1:1比例 */ -.advantage-card__img { - width: 100%; - aspect-ratio: 1 / 1; /* 1:1比例 */ - object-fit: cover; - background-color: #f9f9f9; - display: block; - flex-shrink: 0; -} - -/* 文字区域:保持内边距和布局,内部间距也调整为0.08rem */ -.advantage-card__content { - width: 100%; - padding: 0.4rem 0.23rem 0.31rem 0.2rem; /* 上下内边距 */ - gap: 0.08rem; /* 内部元素间距:设计稿8px=0.08rem */ -} - -/* 标题容器:间距设为0.08rem(8px) */ -.advantage-card__heading-wrap { - display: flex; - align-items: center; - justify-content: space-between; - gap: 0.08rem; /* 设计稿8px=0.08rem */ - width: 100%; -} - -/* 卡片标题:字体大小调整 */ -.advantage-card__heading { - font-size: 0.34rem; - font-weight: 600; - color: #101010; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; /* 强制不换行 */ - overflow: hidden; /* 超出隐藏 */ - text-overflow: ellipsis; /* 显示省略号 */ -} - -/* 描述文字样式 */ -.advantage-card__description { - font-size: 0.24rem; - color:#666666; - margin-top: 0.08rem; /* 与标题间距:设计稿8px=0.08rem */ - white-space: nowrap; /* 强制不换行 */ - overflow: hidden; /* 超出隐藏 */ - text-overflow: ellipsis; /* 显示省略号 */ -} - -/* 箭头大小 */ -.card-arrow { - transition: transform 0.3s ease; - display: inline-flex; - align-items: center; - justify-content: center; - width: 0.33rem; - height: 0.33rem; -} - -/* 卡片hover效果 */ -/* .advantage-card:hover { - transform: scale(1.03); -} */ - -/* 箭头hover位移 */ -.advantage-card:hover .card-arrow { - transform: translateX(0.03rem); -} \ No newline at end of file diff --git a/public/static/index/mobile/css/topic_power_prodline/nav.css b/public/static/index/mobile/css/topic_power_prodline/nav.css index abb7466c..acf013d2 100644 --- a/public/static/index/mobile/css/topic_power_prodline/nav.css +++ b/public/static/index/mobile/css/topic_power_prodline/nav.css @@ -1,68 +1,43 @@ -.nav-box { - display: flex; - justify-content: space-around; - width: 93.5%; - margin: 0 auto; - background-color: #fff; - border-radius: 3.125rem; - box-shadow: 0 0.125rem 0.9375rem rgba(0, 0, 0, 0.05); - position: relative; - z-index: 1; - overflow: visible; - padding: 0 clamp(21px, 5.6vw, 42px); - /* 新增:确保容器能捕获子元素高度 */ - min-height: fit-content; - /* 平板端补偿内边距,抵消负边距影响 */ - /* padding-top: clamp(1rem, 3vw, 2rem);*/ - padding-bottom: clamp(0.5rem, 2vw, 1.5rem); -} - -.nav-item { - display: flex; - flex-direction: column; - align-items: center; - cursor: pointer; - flex: 1; - min-width: 3rem; - max-width: 5rem; - text-align: center; - /* 修改:用相对单位+媒体查询区分设备,避免过度上移 */ - margin-top: clamp(-8%, -2vw, -15%); - /* 新增:确保子元素高度被正确计算 */ - align-self: flex-start; -} - -/* 平板端单独调整负边距 */ -@media (max-width: 1023px) and (min-width: 767px) { - .nav-item { - margin-top: -8%; /* 减小负边距,避免溢出 */ - } - .nav-item p { - padding-top:clamp(6px,2vw,12px); - font-size: clamp(11px, 3vw, 21px); - - } - -} -@media (min-width: 1024px) { - .nav-item { - margin-top: -5%; /* 减小负边距,避免溢出 */ - } - .nav-item p { - padding-top:clamp(6px,2vw,12px); - font-size: clamp(11px, 3vw, 21px); - - } - -} -@media (max-width: 76px) and (min-width: 374px) { - .nav-item { - margin-top: -15%; /* 减小负边距,避免溢出 */ - } - .nav-item p { - padding-top:clamp(6px,2vw,12px); - font-size: clamp(11px, 3vw, 21px); - - } - +/* 设计稿750px → 1rem=100px,所有尺寸按设计稿÷100换算 */ +.nav-box { + display: flex; + justify-content: space-around; + width: 93.5%; + margin: 0 auto; + background-color: #fff; + border-radius: 3.125rem; /* 设计稿312.5px */ + box-shadow: 0 0.125rem 0.9375rem rgba(0, 0, 0, 0.05); /* 设计稿12.5px/93.75px */ + position: relative; + z-index: 1; + overflow: visible; + padding: 0 0.42rem; /* 设计稿42px(左右内边距取中间值) */ + /* min-height: fit-content; */ + /* height:0.86rem; */ + box-sizing: border-box; + padding-bottom: 0.2rem; +} + +.nav-item { + display: flex; + flex-direction: column; + align-items: center; + cursor: pointer; + flex: 1; + margin-top: -0.5rem; + text-align: center; + + align-self: flex-start; +} + +.nav-item img { + width: 0.94rem; /* 设计稿80px(示例图片尺寸,可按实际调整) */ + height: 0.94rem; + margin-bottom: 0.15rem; /* 设计稿10px(图片与文字间距) */ +} + +.nav-item p { + + font-size: 0.22rem; /* 设计稿16px(文字大小) */ + + margin: 0; } \ No newline at end of file diff --git a/public/static/index/mobile/css/topic_power_prodline/nav1.css b/public/static/index/mobile/css/topic_power_prodline/nav1.css deleted file mode 100644 index acf013d2..00000000 --- a/public/static/index/mobile/css/topic_power_prodline/nav1.css +++ /dev/null @@ -1,43 +0,0 @@ -/* 设计稿750px → 1rem=100px,所有尺寸按设计稿÷100换算 */ -.nav-box { - display: flex; - justify-content: space-around; - width: 93.5%; - margin: 0 auto; - background-color: #fff; - border-radius: 3.125rem; /* 设计稿312.5px */ - box-shadow: 0 0.125rem 0.9375rem rgba(0, 0, 0, 0.05); /* 设计稿12.5px/93.75px */ - position: relative; - z-index: 1; - overflow: visible; - padding: 0 0.42rem; /* 设计稿42px(左右内边距取中间值) */ - /* min-height: fit-content; */ - /* height:0.86rem; */ - box-sizing: border-box; - padding-bottom: 0.2rem; -} - -.nav-item { - display: flex; - flex-direction: column; - align-items: center; - cursor: pointer; - flex: 1; - margin-top: -0.5rem; - text-align: center; - - align-self: flex-start; -} - -.nav-item img { - width: 0.94rem; /* 设计稿80px(示例图片尺寸,可按实际调整) */ - height: 0.94rem; - margin-bottom: 0.15rem; /* 设计稿10px(图片与文字间距) */ -} - -.nav-item p { - - font-size: 0.22rem; /* 设计稿16px(文字大小) */ - - margin: 0; -} \ No newline at end of file diff --git a/public/static/index/mobile/css/topic_power_prodline/product.css b/public/static/index/mobile/css/topic_power_prodline/product.css index bfb0d331..d25dece0 100644 --- a/public/static/index/mobile/css/topic_power_prodline/product.css +++ b/public/static/index/mobile/css/topic_power_prodline/product.css @@ -1,38 +1,50 @@ +/* 设计稿750px → 1rem=100px,所有尺寸按设计稿÷100换算 */ .product-box { background: #fff; - padding-top: clamp(3.2rem, 3vw, 5rem); - /* 产品块之间留间距 */ + padding-top: 0.93rem; } .product-title { width: 93.5%; margin: 0 auto; - padding-bottom: clamp(1.5rem, 3vw, 3rem); + padding-bottom: 0.83rem; } .product-title-h2 { - font-size: clamp(24px, 3vw, 2.25rem); - /* padding-top: clamp(1.5rem, 3vw, 3rem); */ + font-size: 0.46rem; } .product-title-p { - font-size: clamp(0.875rem, 1.5vw, 1.125rem); + font-size: 0.24rem; color: #646464; - margin-top: clamp(0.5rem, 1vw, 0.75rem); + margin-top: 0.21rem; } -/* 容器布局:两个产品通用 */ +/* 容器布局:改为上下结构(右侧在上,左侧在下) */ .product-container { display: flex; - gap: clamp(0.4rem, 1vw, 0.71rem); + flex-direction: column-reverse; + gap: 0.1rem; /* 上下间距 */ margin: 0 auto; width: 93.5%; - align-items: flex-start; + align-items: stretch; /* 宽度铺满 */ } -/* 左侧容器:两个产品通用 */ +/* 右侧容器:移到上方 */ +.product-right { + flex: none; /* 取消flex比例,自适应高度 */ + position: relative; + border-radius: 0.1rem; + overflow: hidden; + width: 100%; + background-color: #f5f5f5; + min-height: 1.94rem; + aspect-ratio: 16/9; +} + +/* 左侧容器:移到下方 */ .product-left { - flex: 1.8; + flex: none; /* 取消flex比例,自适应高度 */ position: relative; width: 100%; } @@ -40,37 +52,18 @@ .product-img { width: 100%; height: auto; - border-radius: 10px; + border-radius: 0.1rem; display: block; - /* 取消图片底部空隙 */ } -/* 悬浮图公共样式:两个产品尺寸完全一致(100%宽度) */ - - - - - - -/* 第二个产品:悬浮图上右超出(仅定位差异) */ +/* 第二个产品:悬浮图位置调整(适配下方布局) */ .product-img-2 { - top: -10%; - /* 上超出 */ + top: auto; /* 取消顶部定位 */ + bottom: -0.8rem; /* 底部超出 */ transform: none; - width: 108%; - /* 取消居中 */ -} - -/* 右侧容器:两个产品通用 */ -.product-right { - flex: 3.2; - position: relative; - border-radius: 10px; - overflow: hidden; - width: 100%; - background-color: #f5f5f5; - align-self: stretch; - position: relative; + width: 1.08rem; + position: absolute; + right: 0; } .right-content { @@ -97,10 +90,9 @@ opacity: 0; transition: opacity 0.3s ease; z-index: 2; - display: none; /* 默认隐藏 */ + display: none; } -/* 播放图标默认显示,暂停图标默认隐藏 */ .play-icon { display: inline-block; } @@ -108,7 +100,6 @@ display: none; } -/* .paused类时切换图标 */ .video-play-btn.paused .play-icon { display: none; } @@ -116,163 +107,43 @@ display: inline-block; } -/* 视频显示时按钮可见 */ .right-video[playing] ~ .video-play-btn, .product-right:hover .video-play-btn { opacity: 1; display: block; } -/* PC端适配:仅1024px以上应用PC样式 */ -@media (min-width: 1025px) { - .product-container { - width: 93.5%; - } - - .product-left { - flex: 2; - } - - .product-right { - flex: 5; - } - - - - .product-img-2 { - top: -12%; - } +/* 悬浮图容器:适配下方布局 */ +.product-img-hover { + width: auto; + position: absolute; + right: 0; + bottom: 0; + z-index: 33; } +.right { -/* 移动端+平板端适配(1024px以下):统一样式表现 */ -@media (max-width: 1024px) { - .product-container { - flex-direction: column-reverse; /* 反转列顺序,右在上左在下 */ - } + right: -0.3rem; - .product-left, .product-right { - flex: none; /* 重置flex比例 */ - width: 100%; /* 宽度铺满 */ - } - - .product-right { - align-self: auto; /* 重置对齐方式 */ - aspect-ratio: 16/9; - min-height: 194px; - } - .product-img { - /* max-height: 202px; - object-fit: contain; */ - width: 100%; - } - /* 悬浮图容器宽高与图片一致 */ - .product-img-hover { - width: auto; /* 宽度由图片决定 */ - position: absolute; - right: 0; - bottom: 0; - z-index: 33; - } - .product-img-2 { - top: -8%; - width: auto; - right: 0; - left: auto; - } - .img1 { - - width:356px; - /* 或者保持原有width:100%,只设置max-width */ - max-width:356px; - } - .img2 { - - width:356px; - /* 或者保持原有width:100%,只设置max-width */ - max-width:356px; - } - .img3 { - width:356px; - /* 或者保持原有width:100%,只设置max-width */ - max-width:356px; - } - .img4 { - width:356px; - /* 或者保持原有width:100%,只设置max-width */ - max-width:356px; - } - .img5 { - width:356px; - /* 或者保持原有width:100%,只设置max-width */ - max-width:356px; - } - +} +/* 图片尺寸统一用rem */ +.img1, .img2, .img3, .img4, .img5 { + width: 3.56rem; + max-width: 3.56rem; } -/* 超小屏适配(375px以下) */ -/* @media (max-width: 768px) and (min-width: 375px) */ -@media (min-width: 375px) and (max-width: 767px){ - .img1 { - - width: clamp(138px, 20vw, 276px); - /* 或者保持原有width:100%,只设置max-width */ - max-width: clamp(138px, 20vw, 276px) !important; - } - .img2 { - - width: clamp(135px, 20vw, 270px); - /* 或者保持原有width:100%,只设置max-width */ - max-width: clamp(135px, 20vw, 270px) !important; - } - .img3 { - width: clamp(142px, 20vw, 284px); - /* 或者保持原有width:100%,只设置max-width */ - max-width: clamp(142px, 20vw, 284px) !important; - } - .img4 { - width: clamp(125px, 20vw,250px); - /* 或者保持原有width:100%,只设置max-width */ - max-width: clamp(125px, 20vw,250px) !important; - } - .img5 { - width: clamp(129px, 20vw,258px); - max-width: clamp(129px, 20vw,258px)!important; - } - - .product-right { - min-height: 194px; - } - .product-img-hover { - width:auto; - } - +.img1 { + max-width: 2.76rem; } -@media (min-width: 768px) and (max-width: 1023px) { - .img1 { - - width:100%; - /* 或者保持原有width:100%,只设置max-width */ - max-width:276px; - } - .img2 { - - width:100%; - /* 或者保持原有width:100%,只设置max-width */ - max-width:270px; - } - .img3 { - width:284px; - /* 或者保持原有width:100%,只设置max-width */ - max-width: 284px; - } - .img4 { - width:250px; - /* 或者保持原有width:100%,只设置max-width */ - max-width: 250px; - } - .img5 { - width: 258px; - max-width: 258px; - } - +.img2 { + max-width: 2.7rem; +} +.img3 { + max-width: 2.84rem; +} +.img4 { + max-width: 2.5rem; +} +.img5 { + max-width: 2.68rem; } \ No newline at end of file diff --git a/public/static/index/mobile/css/topic_power_prodline/product1.css b/public/static/index/mobile/css/topic_power_prodline/product1.css deleted file mode 100644 index d25dece0..00000000 --- a/public/static/index/mobile/css/topic_power_prodline/product1.css +++ /dev/null @@ -1,149 +0,0 @@ -/* 设计稿750px → 1rem=100px,所有尺寸按设计稿÷100换算 */ -.product-box { - background: #fff; - padding-top: 0.93rem; -} - -.product-title { - width: 93.5%; - margin: 0 auto; - padding-bottom: 0.83rem; -} - -.product-title-h2 { - font-size: 0.46rem; -} - -.product-title-p { - font-size: 0.24rem; - color: #646464; - margin-top: 0.21rem; -} - -/* 容器布局:改为上下结构(右侧在上,左侧在下) */ -.product-container { - display: flex; - flex-direction: column-reverse; - gap: 0.1rem; /* 上下间距 */ - margin: 0 auto; - width: 93.5%; - align-items: stretch; /* 宽度铺满 */ -} - -/* 右侧容器:移到上方 */ -.product-right { - flex: none; /* 取消flex比例,自适应高度 */ - position: relative; - border-radius: 0.1rem; - overflow: hidden; - width: 100%; - background-color: #f5f5f5; - min-height: 1.94rem; - aspect-ratio: 16/9; -} - -/* 左侧容器:移到下方 */ -.product-left { - flex: none; /* 取消flex比例,自适应高度 */ - position: relative; - width: 100%; -} - -.product-img { - width: 100%; - height: auto; - border-radius: 0.1rem; - display: block; -} - -/* 第二个产品:悬浮图位置调整(适配下方布局) */ -.product-img-2 { - top: auto; /* 取消顶部定位 */ - bottom: -0.8rem; /* 底部超出 */ - transform: none; - width: 1.08rem; - position: absolute; - right: 0; -} - -.right-content { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - object-fit: cover; - transition: opacity 0.3s ease; -} - -.right-video { - display: none; -} -.video-play-btn { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - background: none; - border: none; - cursor: pointer; - opacity: 0; - transition: opacity 0.3s ease; - z-index: 2; - display: none; -} - -.play-icon { - display: inline-block; -} -.pause-icon { - display: none; -} - -.video-play-btn.paused .play-icon { - display: none; -} -.video-play-btn.paused .pause-icon { - display: inline-block; -} - -.right-video[playing] ~ .video-play-btn, -.product-right:hover .video-play-btn { - opacity: 1; - display: block; -} - -/* 悬浮图容器:适配下方布局 */ -.product-img-hover { - width: auto; - position: absolute; - right: 0; - bottom: 0; - z-index: 33; -} -.right { - - right: -0.3rem; - -} -/* 图片尺寸统一用rem */ -.img1, .img2, .img3, .img4, .img5 { - width: 3.56rem; - max-width: 3.56rem; -} - -.img1 { - max-width: 2.76rem; -} -.img2 { - max-width: 2.7rem; -} -.img3 { - max-width: 2.84rem; -} -.img4 { - max-width: 2.5rem; -} -.img5 { - max-width: 2.68rem; -} \ No newline at end of file diff --git a/public/static/index/mobile/css/topic_power_prodline/product_list.css b/public/static/index/mobile/css/topic_power_prodline/product_list.css index 74f2b422..e79b52d1 100644 --- a/public/static/index/mobile/css/topic_power_prodline/product_list.css +++ b/public/static/index/mobile/css/topic_power_prodline/product_list.css @@ -1,7 +1,8 @@ -/* 容器布局:通用基础样式(仅宽度、外边距,不涉及高度) */ +/* 设计稿750px → 1rem=100px,所有尺寸按设计稿÷100换算 */ +/* 容器布局:通用基础样式 */ .product-card-box { width: 93.5%; - margin: clamp(0.7rem, 2vw, 1.5rem) auto 0; + margin: 0.12rem auto 0; padding: 0; } @@ -9,288 +10,115 @@ width: 100%; margin: 0 auto; display: flex; - flex-wrap: nowrap; - overflow: visible !important; /* 改为visible,显示所有内容 */ - /* padding: 0 clamp(0.2rem, 0.6vw, 0.3rem); */ - height: auto !important; /* 高度自适应内容 */ + flex-wrap: wrap; + overflow: visible !important; + height: auto !important; + gap: 0.12rem; /* 间距调整为0.12rem */ + justify-content: space-between; /* 两端对齐,确保铺满 */ + align-items: flex-start; } -/* 卡片包裹容器:确保不独占一行 */ +/* 卡片包裹容器:强制一行2个并铺满 */ .product-card-wrap { - display: contents; /* 让包裹容器不影响布局 */ + display: block !important; + width: calc(50% - 0.06rem) !important; /* 50%宽度 - 间距的一半(0.12rem/2=0.06rem) */ + height: auto !important; + margin: 0 !important; /* 移除额外margin */ +} + +/* 卡片核心:通用样式 */ +.product-card { + background: rgb(242, 243, 245); + cursor: pointer; + width: 100% !important; + flex: none; + box-shadow: 0 0.1125rem 0.4rem rgba(0, 0, 0, 0.05); + margin: 0 !important; + box-shadow: 0 0.05rem 0.15rem rgba(0, 0, 0, 0.08); /* 包裹容器阴影 */ + display: flex; + flex-direction: column; + height: auto !important; + transition: transform 0.3s ease; + border-radius: 0.07rem; +} + +/* 卡片hover效果:通用 */ +.product-card:hover { + transform: scale(1.02); +} + +/* 图片容器:通用样式 */ +.product-card-img { + display: flex; + justify-content: center; + align-items: center; width: 100%; + flex: 0 0 auto; + aspect-ratio: 3 / 2.8; + overflow: hidden; } -/* ######################################################################### */ -/* 移动端+平板样式(max-width: 1023px)- 后续修改仅改这里 */ -/* ######################################################################### */ -@media (max-width: 1024px) { - /* 卡片容器:移动端+平板特有 - 改为wrap换行,一行2个,高度自适应 */ - .product-card-container { - align-items: flex-start; /* 改为flex-start,避免拉伸 */ - flex-wrap: wrap !important; /* 强制开启换行 */ - justify-content: flex-start !important; /* 左对齐 */ - gap: clamp(0.5rem, 1vw, 1rem) !important; /* 设置间距 */ - - height: auto !important; /* 高度自适应内容 */ - } - - /* 卡片包裹容器:移动端+平板适配 */ - .product-card-wrap { - display: block !important; - width: calc(50% - clamp(0.25rem, 0.5vw, 0.5rem)) !important; - margin: 0 !important; - padding: 0 !important; - height: auto !important; /* 高度自适应 */ - } - - /* 卡片核心:移动端+平板改为一行2个,高度自适应内容 */ - .product-card { - background: rgb(242, 243, 245); - border-radius: clamp(0.375rem, 1vw, 0.5rem); - cursor: pointer; - width: 100% !important; /* 卡片宽度100%,由包裹容器控制 */ - flex: none; - box-shadow: 0 clamp(0.1rem, 0.2vw, 0.125rem) - clamp(0.3rem, 0.8vw, 0.5rem) rgba(0, 0, 0, 0.05); - margin: 0 !important; /* 移除margin,用gap控制间距 */ - display: flex; - flex-direction: column; - height: auto !important; /* 高度自适应内容 */ - } - - /* 卡片hover效果:移动端+平板特有 */ - .product-card:hover { - transform: scale(clamp(1.01, 1.02, 1.03)); - transition: transform 0.3s ease; - } - - /* 图片容器:移动端+平板固定占比 */ - .product-card-img { - display: flex; - justify-content: center; - align-items: center; - width: 100%; - flex: 0 0 auto; /* 改为auto,高度自适应 */ - aspect-ratio: 3 / 2.8; /* 保持图片比例 */ - margin-bottom: clamp(0.4rem, 0.6vw, 0.5rem); - overflow: hidden; - border-radius: clamp(0.2rem, 0.4vw, 0.25rem); - } - - /* 产品图片:移动端+平板特有 */ - .product-card img { - width: 100%; - height: 100%; - object-fit: contain; - object-position: center; - } - - /* 文字容器:移动端+平板高度自适应 */ - .product-card-text { - flex: 1 1 auto; /* 改为flex:1,高度自适应内容 */ - display: flex; - flex-direction: column; - justify-content: center; - padding-left: clamp(0.8rem, 2vw, 1.5rem); - padding-right: clamp(0.8rem, 2vw, 1.5rem); - height: auto !important; /* 高度自适应 */ - align-items: center; - } - - /* 标题样式:移动端+平板特有,高度自适应 */ - .product-card-title { - font-size: clamp(15px, 2vw, 30px); - font-weight: 600; - color: #333; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - height: auto !important; /* 移除固定高度 */ - margin-bottom: clamp(10px, 2vw, 20px); /* 添加间距 */ - line-height: 1.2; - text-align: center; - } - - /* 描述样式:移动端+平板高度自适应 */ - .product-card-desc { - font-size: clamp(12px, 1.5vw,21px); - color: #656565; - word-break: break-word; - height: auto !important; /* 移除固定高度 */ - overflow: hidden; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - line-height: 1.4; - text-align: center; - } - - /* 链接图标容器:移动端+平板高度自适应,添加较小的底部内边距 */ - .product-card-link { - width: 100%; - display: flex; - align-items: center; - justify-content: center; /* 水平居中 */ - flex: 0 0 auto; - /* padding: clamp(0.5rem, 1vw, 0.8rem); */ - padding-top: clamp(1.25rem, 3vw, 2.5rem); - padding-bottom: clamp(1.45rem, 3vw,2.9rem); - /* padding-left: clamp(0.8rem, 2vw, 1.5rem); */ - height: auto !important; - text-align: center; /* 针对inline元素的居中 */ - - - } - - /* 链接图标:移动端+平板特有 */ - .product-card-link img { - width: clamp(5.5rem, 5vw,8.5rem); - height: auto; - object-fit: contain; - } - - /* 平板端(768px-1023px)补充样式 */ - @media (min-width: 768px) and (max-width: 1023px) { - .product-card-img { - aspect-ratio: 3 / 2.8; /* 保持图片比例 */ - } - /* 平板端字体稍大 */ - .product-card-title { - font-size: 30px; - text-align: center; - } - - .product-card-desc { - font-size: 21px; - text-align: center; - } - - /* 平板端底部内边距稍大但仍较小 */ - .product-card-link { - width: 100%; - padding-top: clamp(2.3rem, 4vw, 3.2rem); - padding-bottom: clamp(2.7rem, 5vw,3.9rem); - } - .product-card-link img { - width: 100%; - max-width: 154px; - } - } +/* 产品图片:通用样式 */ +.product-card img { + width: 100%; + height: 100%; + object-fit: contain; + object-position: center; } -/* ######################################################################### */ -/* PC端样式(单独配置,min-width: 1024px)- 后续修改仅改这里 */ -/* ######################################################################### */ -@media (min-width: 1024px) { - /* 卡片容器:PC端特有,高度自适应内容 */ - .product-card-container { - align-items: flex-start; /* 改为flex-start,避免拉伸 */ - height: auto !important; /* 高度自适应内容 */ - } +/* 文字容器:通用样式(居中对齐) */ +.product-card-text { + flex: 1 1 auto; + display: flex; + flex-direction: column; + justify-content: center; - /* 卡片包裹容器:PC端适配 */ - .product-card-wrap { - display: contents; - } + height: auto !important; + align-items: center; + text-align: center; +} - /* 卡片核心:PC端高度自适应内容 */ - .product-card { - background: rgb(242, 243, 245); - border-radius: clamp(0.375rem, 1vw, 0.5rem); - cursor: pointer; - width: calc(25% - clamp(0.3rem, 0.5vw, 0.36rem)); - flex: none; - box-shadow: 0 clamp(0.1rem, 0.2vw, 0.125rem) - clamp(0.3rem, 0.8vw, 0.5rem) rgba(0, 0, 0, 0.05); - margin: 0 clamp(0.16rem, 0.24vw, 0.2rem); - display: flex; - flex-direction: column; - height: auto !important; /* 高度自适应内容 */ - } +/* 标题样式:通用 */ +.product-card-title { + font-size: 0.3rem; + font-weight: 600; + color: #333; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + height: auto !important; + margin-bottom: 0.21rem; + +} - /* 卡片hover效果:PC端特有 */ - .product-card:hover { - transform: scale(clamp(1.01, 1.02, 1.03)); - transition: transform 0.3s ease; - } +/* 描述样式:通用(2行截断) */ +.product-card-desc { + font-size: 0.24rem; + color: #656565; + word-break: break-word; + height: auto !important; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + line-height: 1.4; +} - /* 图片容器:PC端高度自适应 */ - .product-card-img { - display: flex; - justify-content: center; - align-items: center; - width: 100%; - flex: 0 0 auto; /* 改为auto,高度自适应 */ - aspect-ratio: 3 / 2.8; /* 保持图片比例 */ - margin-bottom: clamp(0.4rem, 0.6vw, 0.5rem); - overflow: hidden; - border-radius: clamp(0.2rem, 0.4vw, 0.25rem); - } +/* 链接图标容器:通用样式(居中) */ +.product-card-link { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + flex: 0 0 auto; + padding: 0.35rem 0 0.4rem; + height: auto !important; + text-align: center; +} - /* 产品图片:PC端特有 */ - .product-card img { - width: 100%; - height: 100%; - object-fit: contain; - object-position: center; - } - - /* 文字容器:PC端高度自适应 */ - .product-card-text { - flex: 1 1 auto; /* 改为flex:1,高度自适应内容 */ - flex-direction: column; - justify-content: center; - padding-left: clamp(0.8rem, 2vw, 1.5rem); - padding-right: clamp(0.8rem, 2vw, 1.5rem); - display: flex; /* 确保flex布局 */ - height: auto !important; /* 高度自适应 */ - } - - /* 标题样式:PC端特有,高度自适应 */ - .product-card-title { - font-size: clamp(15px, 1.5vw, 30px); - font-weight: 600; - color: #101010; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - height: auto !important; /* 高度自适应 */ - margin-bottom: clamp(0.2rem, 0.4vw, 0.3rem); /* 添加间距 */ - line-height: 1.2; - display: flex; - align-items: center; - } - - /* 描述样式:PC端高度自适应 */ - .product-card-desc { - font-size: clamp(11px, 1.5vw,21px); - color: #656565; - word-break: break-word; - height: auto !important; /* 高度自适应 */ - overflow: hidden; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - line-height: 1.4; - text-align: center; - } - - /* 链接图标容器:PC端高度自适应,添加较小的底部内边距 */ - .product-card-link { - width: 100%; - display: flex; /* 确保flex布局 */ - align-items: center; - flex: 0 0 auto; /* 改为auto,高度自适应 */ - /* padding-left: clamp(0.8rem, 2vw, 1.5rem); */ - padding-bottom: clamp(1rem, 3vw, 1.5rem) ; /* 更小的底部内边距 */ - height: auto !important; /* 高度自适应 */ - } - - /* 链接图标:PC端特有 */ - .product-card-link img { - width: clamp(2.5rem, 5vw, 4.5rem); - height: auto; - object-fit: contain; - } +/* 链接图标:通用样式 */ +.product-card-link img { + width: 1.54rem; + height: auto; + object-fit: contain; } \ No newline at end of file diff --git a/public/static/index/mobile/css/topic_power_prodline/product_list1.css b/public/static/index/mobile/css/topic_power_prodline/product_list1.css deleted file mode 100644 index e79b52d1..00000000 --- a/public/static/index/mobile/css/topic_power_prodline/product_list1.css +++ /dev/null @@ -1,124 +0,0 @@ -/* 设计稿750px → 1rem=100px,所有尺寸按设计稿÷100换算 */ -/* 容器布局:通用基础样式 */ -.product-card-box { - width: 93.5%; - margin: 0.12rem auto 0; - padding: 0; -} - -.product-card-container { - width: 100%; - margin: 0 auto; - display: flex; - flex-wrap: wrap; - overflow: visible !important; - height: auto !important; - gap: 0.12rem; /* 间距调整为0.12rem */ - justify-content: space-between; /* 两端对齐,确保铺满 */ - align-items: flex-start; -} - -/* 卡片包裹容器:强制一行2个并铺满 */ -.product-card-wrap { - display: block !important; - width: calc(50% - 0.06rem) !important; /* 50%宽度 - 间距的一半(0.12rem/2=0.06rem) */ - height: auto !important; - margin: 0 !important; /* 移除额外margin */ -} - -/* 卡片核心:通用样式 */ -.product-card { - background: rgb(242, 243, 245); - cursor: pointer; - width: 100% !important; - flex: none; - box-shadow: 0 0.1125rem 0.4rem rgba(0, 0, 0, 0.05); - margin: 0 !important; - box-shadow: 0 0.05rem 0.15rem rgba(0, 0, 0, 0.08); /* 包裹容器阴影 */ - display: flex; - flex-direction: column; - height: auto !important; - transition: transform 0.3s ease; - border-radius: 0.07rem; -} - -/* 卡片hover效果:通用 */ -.product-card:hover { - transform: scale(1.02); -} - -/* 图片容器:通用样式 */ -.product-card-img { - display: flex; - justify-content: center; - align-items: center; - width: 100%; - flex: 0 0 auto; - aspect-ratio: 3 / 2.8; - overflow: hidden; -} - -/* 产品图片:通用样式 */ -.product-card img { - width: 100%; - height: 100%; - object-fit: contain; - object-position: center; -} - -/* 文字容器:通用样式(居中对齐) */ -.product-card-text { - flex: 1 1 auto; - display: flex; - flex-direction: column; - justify-content: center; - - height: auto !important; - align-items: center; - text-align: center; -} - -/* 标题样式:通用 */ -.product-card-title { - font-size: 0.3rem; - font-weight: 600; - color: #333; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - height: auto !important; - margin-bottom: 0.21rem; - -} - -/* 描述样式:通用(2行截断) */ -.product-card-desc { - font-size: 0.24rem; - color: #656565; - word-break: break-word; - height: auto !important; - overflow: hidden; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - line-height: 1.4; -} - -/* 链接图标容器:通用样式(居中) */ -.product-card-link { - width: 100%; - display: flex; - align-items: center; - justify-content: center; - flex: 0 0 auto; - padding: 0.35rem 0 0.4rem; - height: auto !important; - text-align: center; -} - -/* 链接图标:通用样式 */ -.product-card-link img { - width: 1.54rem; - height: auto; - object-fit: contain; -} \ No newline at end of file diff --git a/public/static/index/mobile/css/topic_power_prodline/swiper.css b/public/static/index/mobile/css/topic_power_prodline/swiper.css index cf7fdfc7..31b85405 100644 --- a/public/static/index/mobile/css/topic_power_prodline/swiper.css +++ b/public/static/index/mobile/css/topic_power_prodline/swiper.css @@ -5,7 +5,7 @@ .auto-swiper-container { width: 100%; /* 关键:高度 = 视口高度的百分比(可调整,如60vh=屏幕高度60%) */ - margin-bottom: 5.7rem; + margin-bottom:1.5rem; /* max-height: 900px; */ min-height: 300px; position: relative; diff --git a/public/static/index/mobile/css/topic_power_prodline/swiper1.css b/public/static/index/mobile/css/topic_power_prodline/swiper1.css deleted file mode 100644 index 31b85405..00000000 --- a/public/static/index/mobile/css/topic_power_prodline/swiper1.css +++ /dev/null @@ -1,75 +0,0 @@ -.swiper-container { - padding: 0 !important; -} -/* 轮播容器 - 核心:基于视口高度自适应 */ -.auto-swiper-container { - width: 100%; - /* 关键:高度 = 视口高度的百分比(可调整,如60vh=屏幕高度60%) */ - margin-bottom:1.5rem; - /* max-height: 900px; */ - min-height: 300px; - position: relative; - margin-top:60px; - -} -/* 轮播项 - 填充容器高度 */ -.auto-swiper-slide { - width: 100%; - /*height: 100%;*/ - display: flex; - align-items: center; - justify-content: center; -} - - -/* 图片自适应核心:填充屏幕比例高度,保持比例 */ -.auto-swiper-slide img { - width: 100%; - height: 100%; - object-fit: contain; /* 替换 cover 为 contain,完整显示图片 */ - display: block; - -} - -/* 轮播容器保持相对定位 */ -.auto-swiper-container { - position: relative; - width: 100%; -} - -/* 轮播容器保持相对定位 */ -.auto-swiper-container { - position: relative; - width: 100%; -} - -/* 指示标容器:居中排列 */ -.swiper-pagination { - position: absolute; - bottom: 10%; /* 距离底部的距离,可调整 */ - left: 50%; - transform: translateX(-50%); - /* width:100%; - display: flex; */ - /* justify-content: center; */ - z-index: 10; -} - -/* 激活状态:白色长条 */ -.swiper-pagination-bullet-active { - background:#fff !important; -} - -/* 未激活状态:黑色透明圆点(可调整透明度) */ -.swiper-pagination-bullet { - display: inline-block; - width: 16px !important; - height: 16px !important; - border-radius: 8px; - /*background: #555;*/ - margin: 0 5px; - /*opacity: 0.8;*/ - border: 1px solid #fff; - /*cursor: pointer;*/ -} -