美化移动端的热销板块
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-12-25 19:08:41 +08:00
parent 17bf43bcf5
commit e9d046ab6c
2 changed files with 472 additions and 311 deletions

View File

@@ -428,8 +428,7 @@
#BFDBFE 50%,
#E0F2FE 52%,
#FFFFFF 60%,
#FFFFFF 100%
);
#FFFFFF 100%);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
@@ -442,6 +441,7 @@
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
@@ -452,6 +452,7 @@
opacity: 0;
transform: translateX(-50px);
}
to {
opacity: 1;
transform: translateX(0);
@@ -613,6 +614,7 @@
from {
width: 0;
}
to {
width: 100%;
}
@@ -698,11 +700,9 @@
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(
circle at center,
background: radial-gradient(circle at center,
rgba(56, 189, 248, 0.15) 0%,
transparent 50%
);
transparent 50%);
opacity: 0;
transition: opacity 0.5s ease;
pointer-events: none;
@@ -733,7 +733,7 @@
}
/* ============================================
热销产品展示区域
热销产品展示区域 - 卡片式布局
============================================ */
.hot-products {
@@ -771,142 +771,259 @@
color: rgba(203, 213, 225, 0.8);
}
/* 产品格容器 */
.products-table-wrapper {
overflow-x: auto;
/* 产品格容器 - 移动优先 */
.products-grid {
display: grid;
grid-template-columns: 1fr;
gap: 16px;
padding: 0 20px;
}
.products-table-wrapper::-webkit-scrollbar {
height: 6px;
/* 平板及以上2列 */
@media (min-width: 768px) {
.products-grid {
grid-template-columns: repeat(2, 1fr);
gap: 20px;
}
}
.products-table-wrapper::-webkit-scrollbar-track {
background: rgba(15, 23, 42, 0.5);
border-radius: 3px;
/* 桌面端3列 */
@media (min-width: 1200px) {
.products-grid {
grid-template-columns: repeat(3, 1fr);
gap: 24px;
}
}
.products-table-wrapper::-webkit-scrollbar-thumb {
background: rgba(56, 189, 248, 0.3);
border-radius: 3px;
/* 超大屏幕4列 */
@media (min-width: 1600px) {
.products-grid {
grid-template-columns: repeat(4, 1fr);
}
}
.products-table-wrapper::-webkit-scrollbar-thumb:hover {
background: rgba(56, 189, 248, 0.5);
}
/* 产品表格 */
.products-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
min-width: 1000px;
}
.products-table thead {
background: rgba(15, 23, 42, 0.8);
}
.products-table thead th {
padding: 16px 20px;
text-align: left;
font-size: 14px;
font-weight: 600;
color: #38BDF8;
border-bottom: 2px solid rgba(56, 189, 248, 0.3);
white-space: nowrap;
}
.products-table thead th:first-child {
border-top-left-radius: 8px;
}
.products-table thead th:last-child {
border-top-right-radius: 8px;
}
.products-table tbody tr {
background: rgba(30, 41, 59, 0.4);
transition: all 0.3s ease;
/* 产品卡片 - 适配深色主题的玻璃态设计 */
.product-card {
background: rgba(30, 41, 59, 0.7);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(148, 163, 184, 0.2);
border-radius: 12px;
padding: 20px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer;
display: flex;
flex-direction: column;
gap: 12px;
box-shadow:
0 4px 16px rgba(15, 23, 42, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.products-table tbody tr:hover {
background: rgba(56, 189, 248, 0.1);
transform: translateX(5px);
box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
.product-card:hover {
transform: translateY(-4px);
border-color: rgba(56, 189, 248, 0.4);
background: rgba(30, 41, 59, 0.85);
box-shadow:
0 8px 32px rgba(15, 23, 42, 0.6),
0 0 20px rgba(56, 189, 248, 0.15),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.products-table tbody td {
padding: 18px 20px;
font-size: 14px;
color: rgba(226, 232, 240, 0.9);
/* 卡片头部 */
.product-card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
margin-bottom: 4px;
}
.product-name {
font-size: 18px;
font-weight: 600;
color: #F9FAFB;
margin: 0;
flex: 1;
line-height: 1.3;
}
/* 产品徽章容器 */
.product-badges {
display: flex;
flex-wrap: wrap;
gap: 6px;
align-items: flex-start;
justify-content: flex-end;
}
/* 产品徽章 */
.product-badge {
display: inline-block;
padding: 3px 8px;
font-size: 11px;
font-weight: 500;
border-radius: 4px;
white-space: nowrap;
line-height: 1.2;
}
.badge-hot {
background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
color: #FFFFFF;
}
.badge-recommend {
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%);
color: #FFFFFF;
}
.badge-promo {
background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
color: #FFFFFF;
}
/* 产品描述 */
.product-desc {
font-size: 13px;
color: rgba(203, 213, 225, 0.85);
line-height: 1.6;
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
min-height: 38px;
}
/* 产品规格 */
.product-specs {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
font-size: 12px;
color: rgba(148, 163, 184, 0.9);
padding: 8px 0;
border-top: 1px solid rgba(148, 163, 184, 0.1);
border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.products-table tbody tr:last-child td:first-child {
border-bottom-left-radius: 8px;
.spec-item {
white-space: nowrap;
}
.products-table tbody tr:last-child td:last-child {
border-bottom-right-radius: 8px;
.spec-divider {
color: rgba(148, 163, 184, 0.4);
user-select: none;
}
/* 产品名称列 */
.products-table .product-name {
font-weight: 600;
color: #F9FAFB;
/* 产品价格区域 */
.product-pricing {
display: flex;
align-items: center;
justify-content: space-between;
align-items: flex-end;
margin: 8px 0;
flex-wrap: wrap;
gap: 8px;
}
.products-table .product-tag {
display: inline-block;
padding: 2px 8px;
font-size: 11px;
border-radius: 4px;
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%);
color: #fff;
font-weight: 500;
.price-main {
display: flex;
align-items: baseline;
gap: 4px;
}
/* 价格列 */
.products-table .product-price {
font-weight: 700;
.price-currency {
font-size: 18px;
color: #38BDF8;
font-weight: 600;
color: #EF4444;
}
.products-table .product-price .unit {
font-size: 12px;
font-weight: 400;
color: rgba(148, 163, 184, 0.8);
.price-value {
font-size: 32px;
font-weight: 700;
color: #EF4444;
line-height: 1;
}
.price-original {
font-size: 13px;
color: rgba(148, 163, 184, 0.7);
text-decoration: line-through;
margin-left: 4px;
}
/* 操作按钮 */
.products-table .product-action {
text-align: center;
.price-limit {
font-size: 12px;
color: rgba(203, 213, 225, 0.7);
white-space: nowrap;
}
.products-table .btn-buy {
display: inline-block;
padding: 8px 24px;
font-size: 13px;
font-weight: 500;
color: #fff;
/* 购买按钮 */
.product-buy-btn {
display: block;
width: 100%;
padding: 12px 24px;
font-size: 14px;
font-weight: 600;
color: #FFFFFF;
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%);
border: none;
border-radius: 6px;
border-radius: 8px;
text-align: center;
text-decoration: none;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
margin-top: 8px;
box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}
.products-table .btn-buy:hover {
.product-buy-btn:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
background: linear-gradient(135deg, #6366F1 0%, #38BDF8 100%);
}
.product-buy-btn:active {
transform: translateY(0);
box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}
/* 移动端优化 */
@media (max-width: 767px) {
.hot-products {
padding: 30px 0;
}
.hot-products-title h3 {
font-size: 24px;
}
.hot-products-title .subtitle {
font-size: 13px;
}
.product-card {
padding: 16px;
}
.product-name {
font-size: 16px;
}
.price-value {
font-size: 28px;
}
.price-currency {
font-size: 16px;
}
.product-buy-btn {
padding: 10px 20px;
font-size: 13px;
}
}
.banner .banner-s .banner-list .banner-item h5 {
@@ -964,9 +1081,12 @@
}
@keyframes float {
0%, 100% {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-20px);
}
@@ -1058,9 +1178,12 @@
}
@keyframes pulse {
0%, 100% {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
@@ -1658,6 +1781,7 @@
from {
filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.2));
}
to {
filter: drop-shadow(0 0 40px rgba(56, 189, 248, 0.4));
}
@@ -2225,6 +2349,7 @@
from {
opacity: 0;
}
to {
opacity: 1;
}
@@ -2280,6 +2405,7 @@ html {
/* 禁用不必要的动画以提升性能 */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
@@ -2481,6 +2607,7 @@ html {
/* 手机 576px - 767px */
@media (max-width: 767px) {
/* ===== 导航栏 - 极简设计 ===== */
#index .nav-header {
padding: 0 8px;
@@ -2506,7 +2633,8 @@ html {
}
#index .nav-menu {
display: none; /* 移动端隐藏主导航 */
display: none;
/* 移动端隐藏主导航 */
}
#index .nav-header .nav-left .nav-icon {
@@ -2898,7 +3026,8 @@ html {
}
.solution-desc p:nth-child(n+2) {
display: none; /* 小屏只显示第1段 */
display: none;
/* 小屏只显示第1段 */
}
.solution-link {
@@ -2912,7 +3041,8 @@ html {
height: 120px;
object-fit: cover;
border-radius: 4px;
order: -1; /* 图片移到上方 */
order: -1;
/* 图片移到上方 */
}
/* ===== 基础设施 - 简化显示 ===== */
@@ -2975,7 +3105,8 @@ html {
}
.honor-item {
width: calc(50% - 6px); /* 改为2列布局 */
width: calc(50% - 6px);
/* 改为2列布局 */
padding: 20px 16px;
}
@@ -3050,6 +3181,7 @@ html {
/* 小手机 最大575px */
@media (max-width: 575px) {
/* ===== 导航栏 - 超紧凑 ===== */
#index .nav-header {
padding: 0 10px;
@@ -3333,7 +3465,8 @@ html {
.solution-desc p {
font-size: 10px;
-webkit-line-clamp: 1; /* 小屏只显示1行 */
-webkit-line-clamp: 1;
/* 小屏只显示1行 */
}
.solution-link {
@@ -3451,6 +3584,7 @@ html {
/* 小屏手机优化480px */
@media (max-width: 480px) and (min-width: 361px) {
/* ===== 导航栏 ===== */
#index .nav-header {
height: 46px !important;
@@ -3558,6 +3692,7 @@ html {
/* 超小屏适配320px */
@media (max-width: 360px) {
/* ===== 导航栏 - 极限压缩 ===== */
#index .nav-header {
padding: 0 8px;
@@ -4012,6 +4147,7 @@ html {
/* 性能优化提示 */
@media (max-width: 768px) {
/* 在移动设备上禁用一些复杂动画以提升性能 */
.banner-cont .swiper-slide::before,
.banner-cont .swiper-slide::after,
@@ -4141,7 +4277,8 @@ html {
}
#index .section.service {
padding-top: 120px; /* 为 banner-s 留出空间 */
padding-top: 120px;
/* 为 banner-s 留出空间 */
}
/* 优化各section之间的过渡 */
@@ -4526,6 +4663,7 @@ html {
background: rgba(56, 189, 248, 0.3);
box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}
/* Mobile Overrides for Index Page */
@media (max-width: 768px) {

View File

@@ -18,8 +18,7 @@
<div class="swiper-wrapper">
{if ( isset($data.banner) ) }
{foreach $data.banner as $key=>$value}
<div class="swiper-slide"
style="background-image: url('{$value.img|default='assets/img/index/1@2x.png'}');">
<div class="swiper-slide" style="background-image: url('{$value.img|default='assets/img/index/1@2x.png'}');">
<div class="section-content">
<div class="title-wrapper">
{if !empty($value.tags)}
@@ -141,100 +140,124 @@
<h3>热销产品推荐</h3>
<p class="subtitle">高性价比云服务器,助力您的业务快速上云</p>
</div>
<div class="products-table-wrapper">
<table class="products-table">
<thead>
<tr>
<th>产品名称</th>
<th>CPU</th>
<th>内存</th>
<th>带宽</th>
<th>系统盘</th>
<th>价格</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="产品名称">
<div class="product-name">
<span>香港弹性云</span>
<span class="product-tag">热销</span>
<div class="products-grid">
<!-- 产品卡片 1 -->
<div class="product-card">
<div class="product-card-header">
<h4 class="product-name">香港弹性云</h4>
<div class="product-badges">
<span class="product-badge badge-hot">热销</span>
<span class="product-badge badge-promo">V0新春专享</span>
</div>
</td>
<td data-label="CPU">2核</td>
<td data-label="内存">2G</td>
<td data-label="带宽">3M</td>
<td data-label="系统盘">50G SSD</td>
<td data-label="价格">
<div class="product-price">
29.9<span class="unit">/月</span>
</div>
</td>
<td class="product-action" data-label="操作">
<a href="./cloud.html" class="btn-buy">立即购买</a>
</td>
</tr>
<tr>
<td data-label="产品名称">
<div class="product-name">
<span>美国高防云</span>
<p class="product-desc">稳定、安全、高效、易用,可存储任意类型和形式的非结构化数据</p>
<div class="product-specs">
<span class="spec-item">2核CPU</span>
<span class="spec-divider">|</span>
<span class="spec-item">2G内存</span>
<span class="spec-divider">|</span>
<span class="spec-item">3M带宽</span>
<span class="spec-divider">|</span>
<span class="spec-item">50G SSD</span>
</div>
</td>
<td data-label="CPU">4核</td>
<td data-label="内存">4G</td>
<td data-label="带宽">5M</td>
<td data-label="系统盘">80G SSD</td>
<td data-label="价格">
<div class="product-price">
59.9<span class="unit">/月</span>
<div class="product-pricing">
<div class="price-main">
<span class="price-currency">¥</span>
<span class="price-value">29.9</span>
<span class="price-original">原价¥59.8</span>
</div>
</td>
<td class="product-action" data-label="操作">
<a href="./cloud.html" class="btn-buy">立即购买</a>
</td>
</tr>
<tr>
<td data-label="产品名称">
<div class="product-name">
<span>新加坡CN2云</span>
<span class="product-tag">推荐</span>
<span class="price-limit">限购1台</span>
</div>
</td>
<td data-label="CPU">4核</td>
<td data-label="内存">8G</td>
<td data-label="带宽">10M</td>
<td data-label="系统盘">100G SSD</td>
<td data-label="价格">
<div class="product-price">
99.9<span class="unit">/月</span>
<a href="./cloud.html" class="product-buy-btn">立即购买</a>
</div>
</td>
<td class="product-action" data-label="操作">
<a href="./cloud.html" class="btn-buy">立即购买</a>
</td>
</tr>
<tr>
<td data-label="产品名称">
<div class="product-name">
<span>日本BGP云</span>
<!-- 产品卡片 2 -->
<div class="product-card">
<div class="product-card-header">
<h4 class="product-name">美国高防云</h4>
<div class="product-badges">
<span class="product-badge badge-promo">V0新春专享</span>
</div>
</td>
<td data-label="CPU">8核</td>
<td data-label="内存">16G</td>
<td data-label="带宽">20M</td>
<td data-label="系统盘">200G SSD</td>
<td data-label="价格">
<div class="product-price">
199.9<span class="unit">/月</span>
</div>
</td>
<td class="product-action" data-label="操作">
<a href="./cloud.html" class="btn-buy">立即购买</a>
</td>
</tr>
</tbody>
</table>
<p class="product-desc">稳定、安全、高效、易用,可承载任意规模和形式的非结构化数据</p>
<div class="product-specs">
<span class="spec-item">4核CPU</span>
<span class="spec-divider">|</span>
<span class="spec-item">4G内存</span>
<span class="spec-divider">|</span>
<span class="spec-item">5M带宽</span>
<span class="spec-divider">|</span>
<span class="spec-item">80G SSD</span>
</div>
<div class="product-pricing">
<div class="price-main">
<span class="price-currency">¥</span>
<span class="price-value">59.9</span>
<span class="price-original">原价¥119.8</span>
</div>
<span class="price-limit">限购1台</span>
</div>
<a href="./cloud.html" class="product-buy-btn">立即购买</a>
</div>
<!-- 产品卡片 3 -->
<div class="product-card">
<div class="product-card-header">
<h4 class="product-name">新加坡CN2云</h4>
<div class="product-badges">
<span class="product-badge badge-recommend">推荐</span>
<span class="product-badge badge-promo">V0新春专享</span>
</div>
</div>
<p class="product-desc">稳定、安全、高效、易用,可承载任意规模和形式的非结构化数据</p>
<div class="product-specs">
<span class="spec-item">4核CPU</span>
<span class="spec-divider">|</span>
<span class="spec-item">8G内存</span>
<span class="spec-divider">|</span>
<span class="spec-item">10M带宽</span>
<span class="spec-divider">|</span>
<span class="spec-item">100G SSD</span>
</div>
<div class="product-pricing">
<div class="price-main">
<span class="price-currency">¥</span>
<span class="price-value">99.9</span>
<span class="price-original">原价¥199.8</span>
</div>
<span class="price-limit">限购1台</span>
</div>
<a href="./cloud.html" class="product-buy-btn">立即购买</a>
</div>
<!-- 产品卡片 4 -->
<div class="product-card">
<div class="product-card-header">
<h4 class="product-name">日本BGP云</h4>
<div class="product-badges">
<span class="product-badge badge-promo">V0新春专享</span>
</div>
</div>
<p class="product-desc">稳定、安全、高效、易用,可承载任意规模和形式的非结构化数据</p>
<div class="product-specs">
<span class="spec-item">8核CPU</span>
<span class="spec-divider">|</span>
<span class="spec-item">16G内存</span>
<span class="spec-divider">|</span>
<span class="spec-item">20M带宽</span>
<span class="spec-divider">|</span>
<span class="spec-item">200G SSD</span>
</div>
<div class="product-pricing">
<div class="price-main">
<span class="price-currency">¥</span>
<span class="price-value">199.9</span>
<span class="price-original">原价¥399.8</span>
</div>
<span class="price-limit">限购1台</span>
</div>
<a href="./cloud.html" class="product-buy-btn">立即购买</a>
</div>
</div>
</div>
</div>