无信息版本
This commit is contained in:
+22
-5
@@ -18,8 +18,7 @@
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html {
|
||||
overflow-y: scroll;
|
||||
overflow-x: auto;
|
||||
overflow-x: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@@ -30,7 +29,8 @@
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
overflow-x: auto;
|
||||
overflow-x: hidden;
|
||||
width: 100vw;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
#pageContent {
|
||||
@@ -56,6 +56,7 @@
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background: transparent;
|
||||
border-bottom: none;
|
||||
@@ -72,8 +73,8 @@
|
||||
justify-content: space-between;
|
||||
height: 64px;
|
||||
padding: 0 32px;
|
||||
width: 1280px;
|
||||
max-width: 1280px;
|
||||
max-width: 1400px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
@@ -3558,6 +3559,13 @@
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 用负 margin 收回 scale 后多出的底部布局空间
|
||||
// transform:scale 不改变 DOM 布局尺寸,视觉缩小但布局仍占原大小
|
||||
// marginBottom = -(原高度 - 缩放后高度) 让滚动范围刚好匹配视觉内容
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
@@ -3571,8 +3579,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
|
||||
+250
-14
@@ -18,18 +18,21 @@
|
||||
--gradient: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
html { scroll-behavior: smooth; overflow-x: hidden; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 1280px;
|
||||
line-height: 1.6;
|
||||
transform-origin: top left;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
@@ -51,6 +54,7 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
@@ -145,6 +149,7 @@
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
}
|
||||
.lang-select-hero { background: transparent; border: none; font-size: 13px; color: var(--muted); cursor: pointer; padding: 8px; }
|
||||
@media (max-width: 768px) {
|
||||
.navbar-menu {
|
||||
display: none;
|
||||
@@ -695,11 +700,125 @@
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
font-size: 13px;
|
||||
}
|
||||
/* 购物弹窗样式 */
|
||||
.contact-modal-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
backdrop-filter: blur(8px);
|
||||
z-index: 2000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.contact-modal-overlay.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
.contact-modal {
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
|
||||
border-radius: 24px;
|
||||
padding: 40px;
|
||||
max-width: 400px;
|
||||
width: 90%;
|
||||
transform: scale(0.9) translateY(20px);
|
||||
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
.contact-modal-overlay.active .contact-modal {
|
||||
transform: scale(1) translateY(0);
|
||||
}
|
||||
.contact-modal-close {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 16px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #6b7280;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.contact-modal-close:hover {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #1f2937;
|
||||
}
|
||||
.contact-modal-icon {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin: 0 auto 16px;
|
||||
background: linear-gradient(135deg, #2f6bff 0%, #06b6d4 100%);
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
}
|
||||
.contact-modal-icon svg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
.contact-modal h3 {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #1f2937;
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
.contact-modal p {
|
||||
font-size: 14px;
|
||||
color: #6b7280;
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
.contact-qr-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.contact-qr-box {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
background: #f3f4f6;
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.contact-qr-box img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.contact-qr-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
background: #f3f4f6;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
color: #4b5563;
|
||||
}
|
||||
.contact-qr-label svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
@@ -713,16 +832,29 @@
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- Hero Section -->
|
||||
<section class="app-hero">
|
||||
<div class="app-hero-content">
|
||||
@@ -999,32 +1131,136 @@
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div><!-- /pageContent -->
|
||||
<script>
|
||||
// 视口缩放 - 基于1920px设计稿
|
||||
(() => {
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
let s = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
s = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
s = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
s = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
// 内容区缩放
|
||||
content.style.transform = `scale(${s})`;
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = `${designWidth}px`;
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- 购物弹窗 -->
|
||||
<div class="contact-modal-overlay" id="shopModal">
|
||||
<div class="contact-modal">
|
||||
<button class="contact-modal-close" id="shopModalClose">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"></line>
|
||||
<line x1="6" y1="6" x2="18" y2="18"></line>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="contact-modal-icon">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="21" r="1"></circle>
|
||||
<circle cx="20" cy="21" r="1"></circle>
|
||||
<path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3>官方旗舰店</h3>
|
||||
<p>扫描二维码,进入官方店铺选购</p>
|
||||
<div class="contact-qr-wrapper">
|
||||
<div class="contact-qr-box"><img src="../images/qr-shop.png" alt="旗舰店二维码" onerror="this.parentElement.innerHTML='<span style=\'color:#9ca3af;font-size:14px;\'>请替换店铺二维码<br>qr-shop.png</span>'" /></div>
|
||||
<div class="contact-qr-label">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
||||
<line x1="7" y1="7" x2="7" y2="7"></line>
|
||||
<line x1="17" y1="7" x2="17" y2="7"></line>
|
||||
<line x1="7" y1="12" x2="7" y2="12"></line>
|
||||
<line x1="17" y1="12" x2="17" y2="12"></line>
|
||||
<line x1="7" y1="17" x2="7" y2="17"></line>
|
||||
<line x1="17" y1="17" x2="17" y2="17"></line>
|
||||
</svg>
|
||||
<span>扫码进店</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 购物弹窗控制
|
||||
const shopModal = document.getElementById('shopModal');
|
||||
const shopBtn = document.getElementById('shopBtn');
|
||||
const shopModalClose = document.getElementById('shopModalClose');
|
||||
|
||||
if (shopBtn) {
|
||||
shopBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
shopModal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
}
|
||||
|
||||
if (shopModalClose) {
|
||||
shopModalClose.addEventListener('click', function() {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
});
|
||||
}
|
||||
|
||||
if (shopModal) {
|
||||
shopModal.addEventListener('click', function(e) {
|
||||
if (e.target === shopModal) {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape' && shopModal && shopModal.classList.contains('active')) {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+191
-22
@@ -17,16 +17,21 @@
|
||||
--shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { overflow-y: scroll; }
|
||||
html { overflow-y: scroll; overflow-x: hidden; }
|
||||
body {
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 1280px;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
line-height: 1.6;
|
||||
transform-origin: top left;
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 导航栏 */
|
||||
.navbar {
|
||||
@@ -35,29 +40,109 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
.navbar-inner {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 64px;
|
||||
padding: 0 32px;
|
||||
max-width: 1200px;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.navbar-logo img { height: 40px; }
|
||||
.navbar-back {
|
||||
.navbar-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
transition: color 0.2s;
|
||||
gap: 8px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.navbar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-logo img {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
}
|
||||
.navbar-link {
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.navbar-link:hover {
|
||||
color: var(--text);
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-link.active {
|
||||
color: var(--primary);
|
||||
background: var(--primary-weak);
|
||||
}
|
||||
.navbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.navbar-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.navbar-btn:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
color: var(--text);
|
||||
}
|
||||
.navbar-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.navbar-cta {
|
||||
padding: 10px 20px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-cta:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
|
||||
}
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
}
|
||||
.lang-select-hero {
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
}
|
||||
.navbar-back:hover { color: var(--text); }
|
||||
|
||||
/* 主内容区 */
|
||||
.main-content {
|
||||
@@ -420,18 +505,43 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
</a>
|
||||
<a href="../index.html" class="navbar-back">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
|
||||
返回首页
|
||||
<div class="navbar-menu">
|
||||
<a href="../index.html" class="navbar-link">首页</a>
|
||||
<a href="products.html" class="navbar-link">产品</a>
|
||||
<a href="stories.html" class="navbar-link">故事</a>
|
||||
<a href="app.html" class="navbar-link">App</a>
|
||||
<a href="company.html?article=201" class="navbar-link active">关于我们</a>
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- 主内容 -->
|
||||
<main class="main-content">
|
||||
<div class="container">
|
||||
@@ -484,25 +594,54 @@
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
let s = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
s = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
s = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
s = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
// 内容区缩放
|
||||
content.style.transform = `scale(${s})`;
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = `${designWidth}px`;
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
@@ -735,5 +874,35 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div><!-- /pageContent -->
|
||||
<!-- 购物弹窗 -->
|
||||
<div class="contact-modal-overlay" id="shopModal" style="position:fixed;inset:0;background:rgba(0,0,0,0.6);backdrop-filter:blur(8px);z-index:2000;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all 0.3s ease;">
|
||||
<div style="background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);border-radius:24px;padding:40px;max-width:400px;width:90%;transform:scale(0.9) translateY(20px);transition:transform 0.3s cubic-bezier(0.34,1.56,0.64,1);box-shadow:0 25px 80px rgba(0,0,0,0.25);position:relative;text-align:center;">
|
||||
<button id="shopModalClose" style="position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,0.05);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#6b7280;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||
</button>
|
||||
<div style="width:64px;height:64px;margin:0 auto 16px;background:linear-gradient(135deg,#2f6bff 0%,#06b6d4 100%);border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:32px;height:32px;"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</div>
|
||||
<h3 style="font-size:22px;font-weight:700;color:#1f2937;margin:0 0 8px;">官方旗舰店</h3>
|
||||
<p style="font-size:14px;color:#6b7280;margin:0 0 24px;">扫描二维码,进入官方店铺选购</p>
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:12px;">
|
||||
<div style="width:160px;height:160px;background:#f3f4f6;border-radius:12px;display:flex;align-items:center;justify-content:center;overflow:hidden;">
|
||||
<img src="../images/qr-shop.png" alt="旗舰店二维码" onerror="this.parentElement.innerHTML='<span style=\'color:#9ca3af;font-size:14px;\'>请替换店铺二维码<br>qr-shop.png</span>'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
var shopModal = document.getElementById('shopModal');
|
||||
var shopBtn = document.getElementById('shopBtn');
|
||||
var shopModalClose = document.getElementById('shopModalClose');
|
||||
if(shopBtn){shopBtn.addEventListener('click',function(e){e.preventDefault();shopModal.style.opacity='1';shopModal.style.visibility='visible';shopModal.querySelector('div').style.transform='scale(1) translateY(0)';document.body.style.overflow='hidden';});}
|
||||
if(shopModalClose){shopModalClose.addEventListener('click',function(){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';});}
|
||||
if(shopModal){shopModal.addEventListener('click',function(e){if(e.target===shopModal){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';}});}
|
||||
document.addEventListener('keydown',function(e){if(e.key==='Escape'&&shopModal&&shopModal.style.visibility==='visible'){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';}});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+191
-22
@@ -17,16 +17,21 @@
|
||||
--shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { overflow-y: scroll; }
|
||||
html { overflow-y: scroll; overflow-x: hidden; }
|
||||
body {
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 1280px;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
line-height: 1.6;
|
||||
transform-origin: top left;
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 导航栏 */
|
||||
.navbar {
|
||||
@@ -35,29 +40,109 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
.navbar-inner {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 64px;
|
||||
padding: 0 32px;
|
||||
max-width: 1200px;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.navbar-logo img { height: 40px; }
|
||||
.navbar-back {
|
||||
.navbar-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
transition: color 0.2s;
|
||||
gap: 8px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.navbar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-logo img {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
}
|
||||
.navbar-link {
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.navbar-link:hover {
|
||||
color: var(--text);
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-link.active {
|
||||
color: var(--primary);
|
||||
background: var(--primary-weak);
|
||||
}
|
||||
.navbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.navbar-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.navbar-btn:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
color: var(--text);
|
||||
}
|
||||
.navbar-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.navbar-cta {
|
||||
padding: 10px 20px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-cta:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
|
||||
}
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
}
|
||||
.lang-select-hero {
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
}
|
||||
.navbar-back:hover { color: var(--text); }
|
||||
|
||||
/* 主内容区 */
|
||||
.main-content {
|
||||
@@ -422,18 +507,43 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
</a>
|
||||
<a href="../index.html" class="navbar-back">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
|
||||
返回首页
|
||||
<div class="navbar-menu">
|
||||
<a href="../index.html" class="navbar-link">首页</a>
|
||||
<a href="products.html" class="navbar-link">产品</a>
|
||||
<a href="stories.html" class="navbar-link">故事</a>
|
||||
<a href="app.html" class="navbar-link">App</a>
|
||||
<a href="company.html?article=201" class="navbar-link">关于我们</a>
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- 主内容 -->
|
||||
<main class="main-content">
|
||||
<div class="container">
|
||||
@@ -488,25 +598,54 @@
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
let s = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
s = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
s = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
s = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
// 内容区缩放
|
||||
content.style.transform = `scale(${s})`;
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = `${designWidth}px`;
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
@@ -1355,5 +1494,35 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div><!-- /pageContent -->
|
||||
<!-- 购物弹窗 -->
|
||||
<div class="contact-modal-overlay" id="shopModal" style="position:fixed;inset:0;background:rgba(0,0,0,0.6);backdrop-filter:blur(8px);z-index:2000;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all 0.3s ease;">
|
||||
<div style="background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);border-radius:24px;padding:40px;max-width:400px;width:90%;transform:scale(0.9) translateY(20px);transition:transform 0.3s cubic-bezier(0.34,1.56,0.64,1);box-shadow:0 25px 80px rgba(0,0,0,0.25);position:relative;text-align:center;">
|
||||
<button id="shopModalClose" style="position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,0.05);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#6b7280;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||
</button>
|
||||
<div style="width:64px;height:64px;margin:0 auto 16px;background:linear-gradient(135deg,#2f6bff 0%,#06b6d4 100%);border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:32px;height:32px;"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</div>
|
||||
<h3 style="font-size:22px;font-weight:700;color:#1f2937;margin:0 0 8px;">官方旗舰店</h3>
|
||||
<p style="font-size:14px;color:#6b7280;margin:0 0 24px;">扫描二维码,进入官方店铺选购</p>
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:12px;">
|
||||
<div style="width:160px;height:160px;background:#f3f4f6;border-radius:12px;display:flex;align-items:center;justify-content:center;overflow:hidden;">
|
||||
<img src="../images/qr-shop.png" alt="旗舰店二维码" onerror="this.parentElement.innerHTML='<span style=\'color:#9ca3af;font-size:14px;\'>请替换店铺二维码<br>qr-shop.png</span>'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
var shopModal = document.getElementById('shopModal');
|
||||
var shopBtn = document.getElementById('shopBtn');
|
||||
var shopModalClose = document.getElementById('shopModalClose');
|
||||
if(shopBtn){shopBtn.addEventListener('click',function(e){e.preventDefault();shopModal.style.opacity='1';shopModal.style.visibility='visible';shopModal.querySelector('div').style.transform='scale(1) translateY(0)';document.body.style.overflow='hidden';});}
|
||||
if(shopModalClose){shopModalClose.addEventListener('click',function(){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';});}
|
||||
if(shopModal){shopModal.addEventListener('click',function(e){if(e.target===shopModal){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';}});}
|
||||
document.addEventListener('keydown',function(e){if(e.key==='Escape'&&shopModal&&shopModal.style.visibility==='visible'){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';}});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+191
-22
@@ -17,16 +17,21 @@
|
||||
--shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { overflow-y: scroll; }
|
||||
html { overflow-y: scroll; overflow-x: hidden; }
|
||||
body {
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 1280px;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
line-height: 1.6;
|
||||
transform-origin: top left;
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 导航栏 */
|
||||
.navbar {
|
||||
@@ -35,29 +40,109 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
.navbar-inner {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 64px;
|
||||
padding: 0 32px;
|
||||
max-width: 1200px;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.navbar-logo img { height: 40px; }
|
||||
.navbar-back {
|
||||
.navbar-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
transition: color 0.2s;
|
||||
gap: 8px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.navbar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-logo img {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
}
|
||||
.navbar-link {
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.navbar-link:hover {
|
||||
color: var(--text);
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-link.active {
|
||||
color: var(--primary);
|
||||
background: var(--primary-weak);
|
||||
}
|
||||
.navbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.navbar-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.navbar-btn:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
color: var(--text);
|
||||
}
|
||||
.navbar-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.navbar-cta {
|
||||
padding: 10px 20px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-cta:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
|
||||
}
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
}
|
||||
.lang-select-hero {
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
}
|
||||
.navbar-back:hover { color: var(--text); }
|
||||
|
||||
/* 主内容区 */
|
||||
.main-content {
|
||||
@@ -420,18 +505,43 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
</a>
|
||||
<a href="../index.html" class="navbar-back">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
|
||||
返回首页
|
||||
<div class="navbar-menu">
|
||||
<a href="../index.html" class="navbar-link">首页</a>
|
||||
<a href="products.html" class="navbar-link">产品</a>
|
||||
<a href="stories.html" class="navbar-link">故事</a>
|
||||
<a href="app.html" class="navbar-link">App</a>
|
||||
<a href="company.html?article=201" class="navbar-link">关于我们</a>
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- 主内容 -->
|
||||
<main class="main-content">
|
||||
<div class="container">
|
||||
@@ -483,25 +593,54 @@
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
let s = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
s = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
s = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
s = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
// 内容区缩放
|
||||
content.style.transform = `scale(${s})`;
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = `${designWidth}px`;
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
@@ -692,5 +831,35 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div><!-- /pageContent -->
|
||||
<!-- 购物弹窗 -->
|
||||
<div class="contact-modal-overlay" id="shopModal" style="position:fixed;inset:0;background:rgba(0,0,0,0.6);backdrop-filter:blur(8px);z-index:2000;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all 0.3s ease;">
|
||||
<div style="background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);border-radius:24px;padding:40px;max-width:400px;width:90%;transform:scale(0.9) translateY(20px);transition:transform 0.3s cubic-bezier(0.34,1.56,0.64,1);box-shadow:0 25px 80px rgba(0,0,0,0.25);position:relative;text-align:center;">
|
||||
<button id="shopModalClose" style="position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,0.05);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#6b7280;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||
</button>
|
||||
<div style="width:64px;height:64px;margin:0 auto 16px;background:linear-gradient(135deg,#2f6bff 0%,#06b6d4 100%);border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:32px;height:32px;"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</div>
|
||||
<h3 style="font-size:22px;font-weight:700;color:#1f2937;margin:0 0 8px;">官方旗舰店</h3>
|
||||
<p style="font-size:14px;color:#6b7280;margin:0 0 24px;">扫描二维码,进入官方店铺选购</p>
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:12px;">
|
||||
<div style="width:160px;height:160px;background:#f3f4f6;border-radius:12px;display:flex;align-items:center;justify-content:center;overflow:hidden;">
|
||||
<img src="../images/qr-shop.png" alt="旗舰店二维码" onerror="this.parentElement.innerHTML='<span style=\'color:#9ca3af;font-size:14px;\'>请替换店铺二维码<br>qr-shop.png</span>'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
var shopModal = document.getElementById('shopModal');
|
||||
var shopBtn = document.getElementById('shopBtn');
|
||||
var shopModalClose = document.getElementById('shopModalClose');
|
||||
if(shopBtn){shopBtn.addEventListener('click',function(e){e.preventDefault();shopModal.style.opacity='1';shopModal.style.visibility='visible';shopModal.querySelector('div').style.transform='scale(1) translateY(0)';document.body.style.overflow='hidden';});}
|
||||
if(shopModalClose){shopModalClose.addEventListener('click',function(){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';});}
|
||||
if(shopModal){shopModal.addEventListener('click',function(e){if(e.target===shopModal){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';}});}
|
||||
document.addEventListener('keydown',function(e){if(e.key==='Escape'&&shopModal&&shopModal.style.visibility==='visible'){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';}});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+191
-22
@@ -17,16 +17,21 @@
|
||||
--shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { overflow-y: scroll; }
|
||||
html { overflow-y: scroll; overflow-x: hidden; }
|
||||
body {
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 1280px;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
line-height: 1.6;
|
||||
transform-origin: top left;
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 导航栏 */
|
||||
.navbar {
|
||||
@@ -35,29 +40,109 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
.navbar-inner {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 64px;
|
||||
padding: 0 32px;
|
||||
max-width: 1200px;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.navbar-logo img { height: 40px; }
|
||||
.navbar-back {
|
||||
.navbar-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
transition: color 0.2s;
|
||||
gap: 8px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.navbar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-logo img {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
}
|
||||
.navbar-link {
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.navbar-link:hover {
|
||||
color: var(--text);
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-link.active {
|
||||
color: var(--primary);
|
||||
background: var(--primary-weak);
|
||||
}
|
||||
.navbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.navbar-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.navbar-btn:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
color: var(--text);
|
||||
}
|
||||
.navbar-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.navbar-cta {
|
||||
padding: 10px 20px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
text-decoration: none;
|
||||
}
|
||||
.navbar-cta:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
|
||||
}
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
}
|
||||
.lang-select-hero {
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
}
|
||||
.navbar-back:hover { color: var(--text); }
|
||||
|
||||
/* 主内容区 */
|
||||
.main-content {
|
||||
@@ -420,18 +505,43 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
</a>
|
||||
<a href="../index.html" class="navbar-back">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
|
||||
返回首页
|
||||
<div class="navbar-menu">
|
||||
<a href="../index.html" class="navbar-link">首页</a>
|
||||
<a href="products.html" class="navbar-link">产品</a>
|
||||
<a href="stories.html" class="navbar-link">故事</a>
|
||||
<a href="app.html" class="navbar-link">App</a>
|
||||
<a href="company.html?article=201" class="navbar-link">关于我们</a>
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- 主内容 -->
|
||||
<main class="main-content">
|
||||
<div class="container">
|
||||
@@ -484,25 +594,54 @@
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
let s = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
s = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
s = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
s = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
// 内容区缩放
|
||||
content.style.transform = `scale(${s})`;
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = `${designWidth}px`;
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
@@ -696,5 +835,35 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div><!-- /pageContent -->
|
||||
<!-- 购物弹窗 -->
|
||||
<div class="contact-modal-overlay" id="shopModal" style="position:fixed;inset:0;background:rgba(0,0,0,0.6);backdrop-filter:blur(8px);z-index:2000;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all 0.3s ease;">
|
||||
<div style="background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);border-radius:24px;padding:40px;max-width:400px;width:90%;transform:scale(0.9) translateY(20px);transition:transform 0.3s cubic-bezier(0.34,1.56,0.64,1);box-shadow:0 25px 80px rgba(0,0,0,0.25);position:relative;text-align:center;">
|
||||
<button id="shopModalClose" style="position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,0.05);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#6b7280;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||
</button>
|
||||
<div style="width:64px;height:64px;margin:0 auto 16px;background:linear-gradient(135deg,#2f6bff 0%,#06b6d4 100%);border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:32px;height:32px;"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</div>
|
||||
<h3 style="font-size:22px;font-weight:700;color:#1f2937;margin:0 0 8px;">官方旗舰店</h3>
|
||||
<p style="font-size:14px;color:#6b7280;margin:0 0 24px;">扫描二维码,进入官方店铺选购</p>
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:12px;">
|
||||
<div style="width:160px;height:160px;background:#f3f4f6;border-radius:12px;display:flex;align-items:center;justify-content:center;overflow:hidden;">
|
||||
<img src="../images/qr-shop.png" alt="旗舰店二维码" onerror="this.parentElement.innerHTML='<span style=\'color:#9ca3af;font-size:14px;\'>请替换店铺二维码<br>qr-shop.png</span>'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
var shopModal = document.getElementById('shopModal');
|
||||
var shopBtn = document.getElementById('shopBtn');
|
||||
var shopModalClose = document.getElementById('shopModalClose');
|
||||
if(shopBtn){shopBtn.addEventListener('click',function(e){e.preventDefault();shopModal.style.opacity='1';shopModal.style.visibility='visible';shopModal.querySelector('div').style.transform='scale(1) translateY(0)';document.body.style.overflow='hidden';});}
|
||||
if(shopModalClose){shopModalClose.addEventListener('click',function(){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';});}
|
||||
if(shopModal){shopModal.addEventListener('click',function(e){if(e.target===shopModal){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';}});}
|
||||
document.addEventListener('keydown',function(e){if(e.key==='Escape'&&shopModal&&shopModal.style.visibility==='visible'){shopModal.style.opacity='0';shopModal.style.visibility='hidden';shopModal.querySelector('div').style.transform='scale(0.9) translateY(20px)';document.body.style.overflow='';}});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+137
-12
@@ -17,14 +17,19 @@
|
||||
--shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { scroll-behavior: smooth; }
|
||||
html { scroll-behavior: smooth; overflow-x: hidden; }
|
||||
body {
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 1280px;
|
||||
line-height: 1.6;
|
||||
transform-origin: top left;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
|
||||
@@ -35,6 +40,7 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
@@ -96,6 +102,7 @@
|
||||
}
|
||||
.navbar-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3); }
|
||||
.mobile-menu-btn { display: none; }
|
||||
.lang-select-hero { background: transparent; border: none; font-size: 13px; color: var(--muted); cursor: pointer; padding: 8px; }
|
||||
@media (max-width: 768px) {
|
||||
.navbar-menu { display: none; }
|
||||
.mobile-menu-btn { display: flex; }
|
||||
@@ -467,7 +474,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
@@ -481,16 +488,29 @@
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- 主内容 -->
|
||||
<main class="main-content" id="mainContent">
|
||||
<!-- 由 JavaScript 动态渲染 -->
|
||||
@@ -502,6 +522,8 @@
|
||||
<p class="footer-text">© 2025 Chookoo 宠科智能科技(苏州)有限公司 保留所有权利</p>
|
||||
</footer>
|
||||
|
||||
</div><!-- /pageContent -->
|
||||
|
||||
|
||||
<script>
|
||||
// 视口缩放 - 基于1920px设计稿
|
||||
@@ -509,25 +531,54 @@
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
let s = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
s = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
s = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
s = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
// 内容区缩放
|
||||
content.style.transform = `scale(${s})`;
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = `${designWidth}px`;
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
@@ -1065,5 +1116,79 @@
|
||||
renderProduct(productId);
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 购物弹窗 -->
|
||||
<div class="contact-modal-overlay" id="shopModal">
|
||||
<div class="contact-modal">
|
||||
<button class="contact-modal-close" id="shopModalClose">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"></line>
|
||||
<line x1="6" y1="6" x2="18" y2="18"></line>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="contact-modal-icon">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="21" r="1"></circle>
|
||||
<circle cx="20" cy="21" r="1"></circle>
|
||||
<path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3>官方旗舰店</h3>
|
||||
<p>扫描二维码,进入官方店铺选购</p>
|
||||
<div class="contact-qr-wrapper">
|
||||
<div class="contact-qr-box"><img src="../images/qr-shop.png" alt="旗舰店二维码" onerror="this.parentElement.innerHTML='<span style=\'color:#9ca3af;font-size:14px;\'>请替换店铺二维码<br>qr-shop.png</span>'" /></div>
|
||||
<div class="contact-qr-label">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
||||
<line x1="7" y1="7" x2="7" y2="7"></line>
|
||||
<line x1="17" y1="7" x2="17" y2="7"></line>
|
||||
<line x1="7" y1="12" x2="7" y2="12"></line>
|
||||
<line x1="17" y1="12" x2="17" y2="12"></line>
|
||||
<line x1="7" y1="17" x2="7" y2="17"></line>
|
||||
<line x1="17" y1="17" x2="17" y2="17"></line>
|
||||
</svg>
|
||||
<span>扫码进店</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 购物弹窗控制
|
||||
var shopModal = document.getElementById('shopModal');
|
||||
var shopBtn = document.getElementById('shopBtn');
|
||||
var shopModalClose = document.getElementById('shopModalClose');
|
||||
|
||||
if (shopBtn) {
|
||||
shopBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
shopModal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
}
|
||||
|
||||
if (shopModalClose) {
|
||||
shopModalClose.addEventListener('click', function() {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
});
|
||||
}
|
||||
|
||||
if (shopModal) {
|
||||
shopModal.addEventListener('click', function(e) {
|
||||
if (e.target === shopModal) {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape' && shopModal && shopModal.classList.contains('active')) {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+57
-16
@@ -20,9 +20,7 @@
|
||||
html, body {
|
||||
height: auto;
|
||||
}
|
||||
html {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
html { overflow-y: scroll; overflow-x: hidden; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
|
||||
@@ -31,8 +29,13 @@
|
||||
color: var(--text);
|
||||
overflow-y: auto;
|
||||
scroll-behavior: smooth;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
transform-origin: top left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
@@ -49,10 +52,10 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.navbar-inner {
|
||||
display: flex;
|
||||
@@ -144,6 +147,7 @@
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
}
|
||||
.lang-select-hero { background: transparent; border: none; font-size: 13px; color: var(--muted); cursor: pointer; padding: 8px; }
|
||||
|
||||
/* 主内容区 */
|
||||
.main-content {
|
||||
@@ -722,7 +726,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 - 与首页完全一致 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
@@ -736,24 +740,29 @@
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" style="background:transparent;border:none;font-size:13px;color:var(--muted);cursor:pointer;padding:8px;">
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- 主内容 -->
|
||||
<main class="main-content">
|
||||
<!-- 页面标题 -->
|
||||
@@ -1102,6 +1111,8 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div><!-- /pageContent -->
|
||||
|
||||
<!-- 社交媒体二维码弹窗 -->
|
||||
<div class="social-modal-overlay" id="socialModal">
|
||||
<div class="social-modal">
|
||||
@@ -1162,28 +1173,58 @@
|
||||
|
||||
<script>
|
||||
// 视口缩放 - 基于1920px设计稿
|
||||
(() => {
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
let s = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
s = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
s = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
s = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
// 内容区缩放
|
||||
content.style.transform = `scale(${s})`;
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = `${designWidth}px`;
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
|
||||
+58
-14
@@ -23,10 +23,16 @@
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 1280px;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
body {
|
||||
transform-origin: top left;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
@@ -48,10 +54,10 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.navbar-inner {
|
||||
display: flex;
|
||||
@@ -143,6 +149,7 @@
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
}
|
||||
.lang-select-hero { background: transparent; border: none; font-size: 13px; color: var(--muted); cursor: pointer; padding: 8px; }
|
||||
@media (max-width: 768px) {
|
||||
.navbar-menu {
|
||||
display: none;
|
||||
@@ -786,7 +793,7 @@
|
||||
</style>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
@@ -800,24 +807,29 @@
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" style="background:transparent;border:none;font-size:13px;color:var(--muted);cursor:pointer;padding:8px;">
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- 页面头部 -->
|
||||
<header class="page-header">
|
||||
<div class="container">
|
||||
@@ -1078,6 +1090,8 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div><!-- /pageContent -->
|
||||
|
||||
<!-- 社交媒体二维码弹窗 -->
|
||||
<div class="social-modal-overlay" id="socialModal">
|
||||
<div class="social-modal">
|
||||
@@ -1138,28 +1152,58 @@
|
||||
|
||||
<script>
|
||||
// 视口缩放 - 基于1920px设计稿
|
||||
(() => {
|
||||
const designWidth = 1920;
|
||||
const minWidth = 1280;
|
||||
const maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let scale = 1;
|
||||
let s = 1;
|
||||
|
||||
if (vw < minWidth) {
|
||||
scale = vw / minWidth;
|
||||
s = vw / minWidth;
|
||||
} else if (vw > maxWidth) {
|
||||
scale = vw / maxWidth;
|
||||
s = vw / maxWidth;
|
||||
} else {
|
||||
scale = vw / designWidth;
|
||||
s = vw / designWidth;
|
||||
}
|
||||
|
||||
document.body.style.transform = `scale(${scale})`;
|
||||
document.body.style.width = `${designWidth}px`;
|
||||
// 内容区缩放
|
||||
content.style.transform = `scale(${s})`;
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = `${designWidth}px`;
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = `scale(${s})`;
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = `${designWidth}px`;
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const s = content.getBoundingClientRect().width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = `-${Math.ceil(layoutH - visualH)}px`;
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
|
||||
+252
-9
@@ -17,14 +17,19 @@
|
||||
--shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { scroll-behavior: smooth; }
|
||||
html { scroll-behavior: smooth; overflow-x: hidden; }
|
||||
body {
|
||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-width: 1280px;
|
||||
line-height: 1.6;
|
||||
transform-origin: top left;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#pageContent {
|
||||
min-width: 1280px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
a { color: inherit; text-decoration: none; }
|
||||
|
||||
@@ -33,6 +38,7 @@
|
||||
position: fixed;
|
||||
top: 0; left: 0; right: 0;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||
@@ -82,6 +88,7 @@
|
||||
}
|
||||
.navbar-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3); }
|
||||
.mobile-menu-btn { display: none; }
|
||||
.lang-select-hero { background: transparent; border: none; font-size: 13px; color: var(--muted); cursor: pointer; padding: 8px; }
|
||||
|
||||
/* 主内容 */
|
||||
.main-content {
|
||||
@@ -334,11 +341,125 @@
|
||||
.story-hero { animation: fadeInUp 0.6s ease; }
|
||||
.story-body { animation: fadeInUp 0.6s ease 0.15s both; }
|
||||
.related-stories { animation: fadeInUp 0.6s ease 0.3s both; }
|
||||
/* 购物弹窗样式 */
|
||||
.contact-modal-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
backdrop-filter: blur(8px);
|
||||
z-index: 2000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.contact-modal-overlay.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
.contact-modal {
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
|
||||
border-radius: 24px;
|
||||
padding: 40px;
|
||||
max-width: 400px;
|
||||
width: 90%;
|
||||
transform: scale(0.9) translateY(20px);
|
||||
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
.contact-modal-overlay.active .contact-modal {
|
||||
transform: scale(1) translateY(0);
|
||||
}
|
||||
.contact-modal-close {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 16px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #6b7280;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.contact-modal-close:hover {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #1f2937;
|
||||
}
|
||||
.contact-modal-icon {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin: 0 auto 16px;
|
||||
background: linear-gradient(135deg, #2f6bff 0%, #06b6d4 100%);
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
}
|
||||
.contact-modal-icon svg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
.contact-modal h3 {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #1f2937;
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
.contact-modal p {
|
||||
font-size: 14px;
|
||||
color: #6b7280;
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
.contact-qr-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.contact-qr-box {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
background: #f3f4f6;
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.contact-qr-box img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.contact-qr-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
background: #f3f4f6;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
color: #4b5563;
|
||||
}
|
||||
.contact-qr-label svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<nav class="navbar" style="opacity:0">
|
||||
<div class="navbar-inner">
|
||||
<a href="../index.html" class="navbar-logo">
|
||||
<img src="../images/logo.png" alt="Chookoo" />
|
||||
@@ -352,16 +473,29 @@
|
||||
</div>
|
||||
<div class="navbar-actions">
|
||||
<a href="help.html" class="navbar-btn" aria-label="Search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>
|
||||
</a>
|
||||
<button class="navbar-btn" id="shopBtn" aria-label="Cart">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>
|
||||
</button>
|
||||
<select id="langSelect" aria-label="Language" class="lang-select-hero">
|
||||
<option value="zh">中文</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="ja">日本語</option>
|
||||
</select>
|
||||
<a href="../index.html#contact" class="navbar-cta">联系我们</a>
|
||||
<button class="navbar-btn mobile-menu-btn" aria-label="Menu">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
// 同步缩放导航栏,防止闪烁(script 是渲染阻塞的,浏览器不会画出未缩放的 nav)
|
||||
(function(){var n=document.querySelector('.navbar');var vw=window.innerWidth;var s=vw<1280?vw/1280:vw>2560?vw/2560:vw/1920;n.style.transform='scale('+s+')';n.style.transformOrigin='top left';n.style.width='1920px';n.style.opacity='1';})();
|
||||
</script>
|
||||
|
||||
<div id="pageContent" style="opacity:0">
|
||||
<!-- 主内容 -->
|
||||
<main class="main-content" id="mainContent">
|
||||
<!-- 由 JavaScript 动态渲染 -->
|
||||
@@ -372,18 +506,53 @@
|
||||
<p class="footer-text">© 2025 Chookoo 宠科智能科技(苏州)有限公司 保留所有权利</p>
|
||||
</footer>
|
||||
|
||||
</div><!-- /pageContent -->
|
||||
|
||||
<script>
|
||||
// 视口缩放
|
||||
// 视口缩放 - 基于1920px设计稿
|
||||
(() => {
|
||||
const designWidth = 1920, minWidth = 1280, maxWidth = 2560;
|
||||
const content = document.getElementById('pageContent');
|
||||
const navbar = document.querySelector('.navbar');
|
||||
|
||||
function scale() {
|
||||
const vw = window.innerWidth;
|
||||
let s = vw < minWidth ? vw / minWidth : vw > maxWidth ? vw / maxWidth : vw / designWidth;
|
||||
document.body.style.transform = 'scale(' + s + ')';
|
||||
document.body.style.width = designWidth + 'px';
|
||||
|
||||
// 内容区缩放
|
||||
content.style.transform = 'scale(' + s + ')';
|
||||
content.style.transformOrigin = 'top left';
|
||||
content.style.width = designWidth + 'px';
|
||||
|
||||
// 修复底部空白
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = '-' + Math.ceil(layoutH - visualH) + 'px';
|
||||
|
||||
// 内容区显示
|
||||
content.style.opacity = '1';
|
||||
|
||||
// navbar 单独缩放(fixed 不受 content transform 影响)
|
||||
if (navbar) {
|
||||
navbar.style.transform = 'scale(' + s + ')';
|
||||
navbar.style.transformOrigin = 'top left';
|
||||
navbar.style.width = designWidth + 'px';
|
||||
navbar.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function fixLayout() {
|
||||
const rect = content.getBoundingClientRect();
|
||||
const s = rect.width / content.scrollWidth;
|
||||
const layoutH = content.scrollHeight;
|
||||
const visualH = layoutH * s;
|
||||
content.style.marginBottom = '-' + Math.ceil(layoutH - visualH) + 'px';
|
||||
}
|
||||
|
||||
scale();
|
||||
window.addEventListener('resize', scale);
|
||||
window.addEventListener('load', fixLayout);
|
||||
setTimeout(fixLayout, 2000);
|
||||
})();
|
||||
|
||||
// 故事数据库
|
||||
@@ -632,5 +801,79 @@
|
||||
renderStory(storyId);
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- 购物弹窗 -->
|
||||
<div class="contact-modal-overlay" id="shopModal">
|
||||
<div class="contact-modal">
|
||||
<button class="contact-modal-close" id="shopModalClose">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="18" y1="6" x2="6" y2="18"></line>
|
||||
<line x1="6" y1="6" x2="18" y2="18"></line>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="contact-modal-icon">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="21" r="1"></circle>
|
||||
<circle cx="20" cy="21" r="1"></circle>
|
||||
<path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3>官方旗舰店</h3>
|
||||
<p>扫描二维码,进入官方店铺选购</p>
|
||||
<div class="contact-qr-wrapper">
|
||||
<div class="contact-qr-box"><img src="../images/qr-shop.png" alt="旗舰店二维码" onerror="this.parentElement.innerHTML='<span style=\'color:#9ca3af;font-size:14px;\'>请替换店铺二维码<br>qr-shop.png</span>'" /></div>
|
||||
<div class="contact-qr-label">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
||||
<line x1="7" y1="7" x2="7" y2="7"></line>
|
||||
<line x1="17" y1="7" x2="17" y2="7"></line>
|
||||
<line x1="7" y1="12" x2="7" y2="12"></line>
|
||||
<line x1="17" y1="12" x2="17" y2="12"></line>
|
||||
<line x1="7" y1="17" x2="7" y2="17"></line>
|
||||
<line x1="17" y1="17" x2="17" y2="17"></line>
|
||||
</svg>
|
||||
<span>扫码进店</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 购物弹窗控制
|
||||
var shopModal = document.getElementById('shopModal');
|
||||
var shopBtn = document.getElementById('shopBtn');
|
||||
var shopModalClose = document.getElementById('shopModalClose');
|
||||
|
||||
if (shopBtn) {
|
||||
shopBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
shopModal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
}
|
||||
|
||||
if (shopModalClose) {
|
||||
shopModalClose.addEventListener('click', function() {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
});
|
||||
}
|
||||
|
||||
if (shopModal) {
|
||||
shopModal.addEventListener('click', function(e) {
|
||||
if (e.target === shopModal) {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape' && shopModal && shopModal.classList.contains('active')) {
|
||||
shopModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
# Chookoo 官网项目功能总结报告
|
||||
|
||||
> 项目名称:chookoo.net 官网
|
||||
> 技术方案:纯静态多页 HTML 站点(原生 HTML / CSS / JS,无框架依赖)
|
||||
|
||||
---
|
||||
|
||||
## 一、项目定位
|
||||
|
||||
Chookoo(宠科智能科技)企业官网,面向 AIoT 智能宠物健康管理品牌,承载品牌展示、产品推广、App 下载引导及用户服务等核心职能。
|
||||
|
||||
---
|
||||
|
||||
## 二、页面结构
|
||||
|
||||
全站共 **10 个页面**,覆盖以下模块:
|
||||
|
||||
| 模块 | 页面文件 | 说明 |
|
||||
|------|----------|------|
|
||||
| 首页 | `index.html` | 轮播图 Hero 区、产品概览、联系表单;导航栏滚动时由透明切换为白底毛玻璃效果 |
|
||||
| 产品列表 | `pages/products.html` | 全部产品展示,支持按类别筛选(猫用 / 狗用 / 智能厕所 / 喂养 / 监控) |
|
||||
| 产品详情 | `pages/product-detail.html` | 单品详情页,通过 URL 参数 `?id=` 区分不同产品 |
|
||||
| App 介绍 | `pages/app.html` | Chookoo App 核心卖点展示(毫米波雷达、红外测温、AI 健康预警、多设备联动),提供 iOS / Android / APK 三端下载入口 |
|
||||
| 宠物故事 | `pages/stories.html` | 用户故事 / 博客内容列表 |
|
||||
| 故事详情 | `pages/story-detail.html` | 单篇故事详情页 |
|
||||
| 公司介绍 | `pages/company.html` | 企业信息、团队介绍、发展历程 |
|
||||
| 合作伙伴 | `pages/partner.html` | 商务合作与渠道信息 |
|
||||
| 法律条款 | `pages/legal.html` | 隐私政策、服务条款等法律文本 |
|
||||
| 帮助中心 | `pages/help.html` | 常见问题、使用指南、售后支持 |
|
||||
|
||||
---
|
||||
|
||||
## 三、产品线展示
|
||||
|
||||
网站覆盖 **4 大产品线**,共 13+ 款产品:
|
||||
|
||||
### 3.1 智能厕所系列
|
||||
- 智能猫厕所 Pro(AkiWell 主动健康猫砂盆)
|
||||
- 智能猫厕所 Lite(泌尿健康守护)
|
||||
- 智能狗厕所
|
||||
|
||||
### 3.2 喂养系列
|
||||
- 智能喂食器(定时定量精准投喂)
|
||||
- 智能饮水机(四重过滤循环净化)
|
||||
- 智能猫粮桶 / 狗粮桶(真空保鲜、智能控湿)
|
||||
|
||||
### 3.3 监控系列
|
||||
- AI 宠物摄像头(1080P 高清夜视、AI 行为识别)
|
||||
- 宠物健康追踪器(实时监测活动量与睡眠)
|
||||
- 环境监测仪(温湿度、空气质量)
|
||||
|
||||
### 3.4 配件系列
|
||||
- 替换滤网套装、清洁耗材包、备用电源适配器、延长保修服务
|
||||
|
||||
---
|
||||
|
||||
## 四、核心交互功能
|
||||
|
||||
| 功能 | 实现方式 | 说明 |
|
||||
|------|----------|------|
|
||||
| 视口自适应 | `transform: scale()` | 基于 1920px 设计稿,自动缩放适配 1280px–2560px 屏幕 |
|
||||
| 产品分类筛选 | JS DOM 操作 | 点击分类按钮过滤产品卡片,支持跨分类联合筛选 |
|
||||
| 社交媒体弹窗 | Modal 组件 | 展示微信 / 微博 / 小红书 / 抖音二维码,支持 ESC 关闭 |
|
||||
| 旗舰店弹窗 | Modal 组件 | 购物车图标触发,展示店铺二维码引导购买 |
|
||||
| 多语言切换 | `<select>` 控件 | 中文 / English / 日本語 三语切换 UI 已就绪 |
|
||||
| 响应式布局 | CSS Media Query | 1024px、768px 两个断点,适配平板与移动端 |
|
||||
| 导航栏滚动效果 | scroll 监听 + class 切换 | 首页导航初始透明覆盖在轮播图上,滚动后变为白底毛玻璃 |
|
||||
|
||||
---
|
||||
|
||||
## 五、App 核心技术亮点
|
||||
|
||||
Chookoo App 页面重点展示以下差异化技术:
|
||||
|
||||
1. **毫米波雷达监测** — 24 小时无感监测宠物心率与呼吸频率,无需穿戴设备
|
||||
2. **红外体温检测** — 精准测温(±0.1°C),每次如厕自动测量,发烧即时预警
|
||||
3. **AI 健康预警** — 基于多维度数据(饮食、排泄、活动)AI 综合分析,异常主动干预
|
||||
4. **多设备生态联动** — 喂食器、猫砂盆、饮水机数据互通,构建完整健康管理生态
|
||||
|
||||
---
|
||||
|
||||
## 六、设计规范
|
||||
|
||||
- **配色方案:** 主色 `#2f6bff`(蓝),辅色 `#06b6d4`(青),渐变贯穿全站
|
||||
- **字体:** Inter + 系统字体回退链
|
||||
- **卡片风格:** 16px–20px 圆角、悬浮阴影动效、1px 边框
|
||||
- **最小设计宽度:** 1280px,确保桌面端体验一致
|
||||
@@ -0,0 +1,31 @@
|
||||
# Chookoo 产品网站 - 新电脑配置清单
|
||||
|
||||
## 最小运行清单
|
||||
|
||||
| 项目 | 说明 |
|
||||
|---|---|
|
||||
| **浏览器** | Chrome / Edge / Firefox 任意一个 |
|
||||
| **本地服务器** | VS Code + Live Server 插件(右键 `index.html` → Open with Live Server) |
|
||||
|
||||
## 如果还需要编辑 Excel 模板
|
||||
|
||||
| 项目 | 说明 |
|
||||
|---|---|
|
||||
| **Python 3.8+** | 运行 `tools/generate_template.py` |
|
||||
| **openpyxl** | `pip install openpyxl` |
|
||||
|
||||
## 如果需要 Git 版本管理
|
||||
|
||||
| 项目 | 说明 |
|
||||
|---|---|
|
||||
| **Git** | `git init` 已完成,直接用即可 |
|
||||
|
||||
## 快速开始步骤
|
||||
|
||||
1. 安装 [VS Code](https://code.visualstudio.com/)
|
||||
2. 安装扩展 **Live Server**(Extensions 搜索 "Live Server")
|
||||
3. 用 VS Code 打开 `chookoo.net` 文件夹
|
||||
4. 右键 `index.html` → **Open with Live Server**
|
||||
5. 浏览器自动打开 `http://127.0.0.1:5501/index.html`
|
||||
|
||||
无需 Node.js、无需 npm、无需数据库、无需任何编译构建。
|
||||
Reference in New Issue
Block a user