湖南二手房学区房:为孩子教育选好房

本文摘要

探索湖南二手房学区房的独特价值,包括热门城市推荐和购房注意事项。实用指南帮助您做出明智选择。

湖南二手房学区房:为孩子教育选好房

<a href="/hu-nan-er-shou-fang/article-20260603162854" title="湖南二手房">湖南二手房</a>学区房:为孩子教育选好房</title<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script> <script>LA.init({id:"LAtUem6WtnC5APym",ck:"LAtUem6WtnC5APym"})</script> <style id="tv-variation">:root{--v-primary:#15803d;--v-primary-dark:#166534;--v-primary-light:#dcfce7;--v-accent:#e11d48;--v-bg-subtle:#f0fdf4;--v-dark-bg:#0a1a0d;--v-font-heading:"Raleway", "PingFang SC", "Microsoft YaHei", sans-serif;--v-font-body:"Raleway", "PingFang SC", "Microsoft YaHei", sans-serif;--v-space-xs:0.25rem;--v-space-sm:0.5rem;--v-space-md:0.875rem;--v-space-lg:1.5rem;--v-space-xl:2.5rem;--v-space-2xl:3.5rem;--v-radius-sm:3px;--v-radius-md:6px;--v-radius-lg:10px;--v-radius-xl:14px;--v-radius-full:9999px} /* 变异覆盖 */ :root { --primary-color: var(--v-primary); --primary-dark: var(--v-primary-dark); --primary-light: var(--v-primary-light); --accent-color: var(--v-accent); --bg-subtle: var(--v-bg-subtle); --dark-bg: var(--v-dark-bg); } body { font-family: var(--v-font-body) !important; } h1,h2,h3,h4,h5,h6 { font-family: var(--v-font-heading) !important; } /* == 页面宽度变异 == */ :root{--v-page-width:1080px;} :root{--v-hero-bg:linear-gradient(135deg, var(--v-dark-bg) 0%, var(--v-primary-dark) 45%, color-mix(in srgb, var(--v-accent) 45%, var(--v-primary-dark)) 100%);--v-hero-text:#ffffff;--v-hero-text-secondary:rgba(255,255,255,0.78);--v-hero-text-muted:rgba(255,255,255,0.55);--v-hero-surface:rgba(0,0,0,0.18);--v-hero-surface-border:rgba(255,255,255,0.10);--v-hero-surface-hover:rgba(0,0,0,0.25);--v-hero-btn2-border:rgba(255,255,255,0.35);--v-hero-btn2-hover-bg:rgba(255,255,255,0.10);--v-hero-btn2-hover-border:rgba(255,255,255,0.55);--v-hero-divider:rgba(255,255,255,0.08);--v-hero-deco:radial-gradient(circle, color-mix(in srgb, var(--v-accent) 18%, transparent) 0%, transparent 70%)} :root{--v-footer-bg:var(--v-bg-subtle, #f8fafc);--v-footer-text:var(--v-dark-bg, #0B1E3A);--v-footer-text-muted:#64748b;--v-footer-border:#e2e8f0;--v-footer-link-hover:var(--v-primary, #2563eb);--v-footer-divider:linear-gradient(90deg, transparent, #cbd5e1, transparent);--v-footer-tag-bg:#ffffff;--v-footer-tag-border:#e2e8f0;--v-footer-tag-hover-bg:color-mix(in srgb, var(--v-primary) 8%, transparent)} :root{--v-cta-bg:linear-gradient(135deg, var(--v-primary-dark) 0%, var(--v-primary) 50%, color-mix(in srgb, var(--v-accent) 25%, var(--v-primary)) 100%);--v-cta-text:#ffffff;--v-cta-text-muted:rgba(255,255,255,0.85);--v-cta-btn2-color:#ffffff;--v-cta-btn2-border:rgba(255,255,255,0.40);--v-cta-btn2-hover-bg:rgba(255,255,255,0.12);--v-cta-btn2-hover-border:rgba(255,255,255,0.60)} :root{--v-sidebar-bg:#ffffff;--v-sidebar-border:1px solid #e2e8f0;--v-sidebar-shadow:none;--v-sidebar-title-color:var(--v-dark-bg, #0B1E3A);--v-sidebar-title-border:2px solid var(--v-primary, #2563eb);--v-sidebar-text:#475569;--v-sidebar-link-hover:var(--v-primary, #2563eb);--v-sidebar-item-border:#e2e8f0;--v-sidebar-icon-bg:transparent;--v-sidebar-icon-color:var(--v-primary, #2563eb)} :root{--v-list-bg:#ffffff;--v-list-border:none;--v-list-shadow:0 1px 4px rgba(0,0,0,0.05);--v-list-shadow-hover:0 8px 28px rgba(0,0,0,0.10);--v-list-title-color:var(--v-dark-bg, #0B1E3A);--v-list-title-hover:var(--v-primary, #2563eb);--v-list-desc-color:#6B7B8D;--v-list-time-bg:rgba(0,0,0,0.55);--v-list-time-color:#ffffff;--v-list-radius:var(--v-radius-lg, 10px)} /* == 栏目页列表布局变异 == */ .tv-archive-grid .archive-grid{display:grid !important;grid-template-columns:repeat(2,1fr) !important;gap:20px !important;flex-direction:unset !important;} .tv-archive-grid .article-list-card-link{flex-direction:column !important;gap:0 !important;padding:0 !important;} .tv-archive-grid .article-list-thumb{flex:none !important;width:100% !important;height:180px !important;border-radius:var(--v-list-radius, 8px) var(--v-list-radius, 8px) 0 0 !important;} .tv-archive-grid .article-list-body{padding:16px 18px 20px !important;gap:8px !important;} .tv-archive-grid .article-list-title{font-size:16px !important;-webkit-line-clamp:2 !important;} @media(max-width:560px){.tv-archive-grid .archive-grid{grid-template-columns:1fr !important;}} /* == 文章页排版变异 == */ .tv-article-body article p,.tv-article-body .article-content p,.tv-article-body .article-body p,.tv-article-body .sb-article-content p{font-size:18px;line-height:1.85;margin-bottom:1em;} .tv-article-body article li,.tv-article-body .article-content li,.tv-article-body .sb-article-content li{font-size:18px;line-height:1.85;} /* == 首页最新文章布局变异 == */ :root{--v-hp-article-min-w:420px} /* == 首页服务面板布局变异 == */ .services-panel,.sb-hero-panel{display:none !important;} .services-grid{grid-template-columns:repeat(3,1fr) !important;} .sb-hero{grid-template-columns:1fr !important;} /* == Services 卡片变异 == */ .service-card{background:var(--v-list-bg,#ffffff);border:var(--v-list-border,1px solid var(--border-color,#e2e8f0));border-radius:var(--v-list-radius,var(--radius-xl,16px));box-shadow:var(--v-list-shadow,none);} .service-card:hover{box-shadow:var(--v-list-shadow-hover,0 8px 28px rgba(0,0,0,0.1));} .service-card .card-icon{background:color-mix(in srgb, var(--v-primary,#3b82f6) 10%, transparent);} /* == 分页样式变异 == */ :root{--v-pagi-align:flex-start;--v-pagi-radius:9999px;--v-pagi-border:1px solid var(--border-color,#e2e8f0);--v-pagi-bg:var(--bg-white,#fff);--v-pagi-active-bg:var(--v-primary,#3b82f6);--v-pagi-active-color:#fff;--v-pagi-hover-color:var(--v-primary,#3b82f6);} /* == 首屏统计卡片变异 == */ :root{--v-stat-cols:repeat(4, minmax(0, 1fr));--v-stat-radius:9999px;--v-stat-bg:color-mix(in srgb, var(--v-primary, #3b82f6) 5%, var(--bg-white, #fff));--v-stat-border:1px solid color-mix(in srgb, var(--v-primary, #3b82f6) 12%, transparent);--v-stat-padding:1.25rem 2rem;--v-stat-text:#0B1E3A;--v-stat-text-secondary:#64748b;--v-stat-num-bg:color-mix(in srgb, var(--v-primary, #3b82f6) 10%, transparent);--v-stat-num-color:var(--v-primary, #3b82f6);--v-stat-hover-transform:translateY(-2px);--v-stat-hover-shadow:0 4px 16px rgba(0,0,0,0.08);} /* == 页脚导航变异 == */ :root{--v-fnav-display:flex;--v-fnav-gap:0.5rem 0.5rem;} .footer-nav li + li::before,.sb-footer-nav a + a::before{content:'·';color:var(--v-footer-text-muted,rgba(255,255,255,0.4));margin-right:0.5rem;} /* == 导航菜单变异 == */ .header-content,.sb-topbar{justify-content:flex-start;gap:1rem;} .header-content .logo,.sb-topbar .sb-logo{margin-right:1.5rem;} .header-content .nav,.sb-topbar .sb-nav{margin-right:auto;} .header-search{margin-left:auto;} .nav-links,.menu-nav,.sb-nav{gap:0.75rem;} .nav-links a,.menu-nav a,.sb-nav a{border-radius:9999px;padding:0.35rem 0.875rem;border:1.5px solid transparent;} .nav-links a:hover,.menu-nav a:hover,.sb-nav a:hover{border-color:var(--v-primary, #3b82f6);background:none;} .nav-links a.is-active,.menu-nav a.is-active,.sb-nav a.is-active{border-color:var(--v-primary, #3b82f6);color:var(--v-primary, #3b82f6);background:none;font-weight:600;} </style> <meta name="google-adsense-account" content="ca-pub-5795919087237735"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5795919087237735" crossorigin="anonymous"></script> </head><body><section id="introduction"><h1 class="content-title">湖南<a href="/hu-nan-er-shou-fang/article-20260603162854" title="二手房">二手房</a>学区房:为孩子教育选好房</h1><p>我跟你讲,最近我有个朋友在考虑换房子,家里孩子都上小学了,就想找个好的学区房。咱们今天就来聊聊这个,看看在湖南买二手房学区房的门道。其实呢,学区房不是什么新东西,但在这几年,它的热度一直居高不下,尤其在大城市如长沙、株洲这些地方,家长们为孩子入学愿意花大价钱。这一切背后,是对优质教育资源的追求。但你也得小心,别被那些花里胡哨的广告给忽悠了。</p></section><section id="section-one"><h2>为什么现在这么多人抢学区房?</h2><p>说白了,学区房的核心价值就是教育配套。比如说,在长沙的开福区,一些热门小学周边的房子,特别抢手,因为家长们都想让孩子进那所好小学。这种需求,我姑娘也遇到过,她爸爸查了很多资料,正犹豫要不要为了学校多花几十万。其实在湖南,这种现象很常见,尤其是省城和下属大城市,教育资源的不均衡分布,让更多人把房子和孩子教育绑定在一起。房地产专家分析说,学区房的背后,是家长的投资意识,但也藏着风险,比如政策变化或者学校质量不达预期。</p><p>举个例子,去年在株洲,某楼盘打着名校学区旗号,结果入住后发现,学校还没完全交接清楚。这就提醒咱们,别光听销售的话,得自己去了解政策和历史。其实呢,学区房市场热度高涨,也推动了房价上涨,但回归理性来看,购买学区房还是能为孩子的未来发展打下一个好基础。</p></section><section id="section-two"><h2>湖南各地二手房学区房市场大盘点</h2><p>咱们先来点实际的。湖南有几个城市是学区房重点区域:长沙、株洲、湘潭等。拿长沙来说,长沙的河西、开福区、岳麓区都有不少热门学区房。特别是一些老城区的二手房,房龄虽大,但靠近名校,价格相对亲民。我之前也帮朋友看过一套房子,位置在开福区某小学附近,二手房,房主急售,价格比周边新房便宜不少。</p><p>株洲呢,那边也很看重基础教育,特别是云龙区的一些学区房,近些年受到追捧。不过要注意,不同城市政策不同,比如现在很多地方要求夫妻必须在同一学区连续居住满几年才能享受学位。这就像一层滤网,防非真刚需。湘潭、岳阳这些城市也逐渐兴起学区房概念,但整体上,它们的房价还不会像省会长城市那样天价。</p><blockquote>小窍门:查询学区划分最可靠的方式是去当地教育局网站,或者使用官方APP验证,我见过不少人被中介忽悠买错学区。</blockquote></section><section id="section-three"><h2>购买二手房学区房避坑指南</h2><p>说到买学区房,我不止一次看客户踩过雷。比如第一,警惕房龄和小区设施。很多老小区虽然学区好,但电梯、安保可能年久失修,得掂量投入产出比。第二,学位占用问题。我遇到过一次,一家人为入学买了房,交了首付才发现,房屋正在用于其他孩子上学名额了,这可不是小事。</p><p>还有一个坑是房价虚高。某些热门地段的二手房,会被炒到虚高价位,建议多找几家中介或使用真实挂牌平台比较。记住,我不是说绝对别买学区房,而是要做功课,比如用学区房查询APP确认学校对口范围,或者加入家长群了解真实情况。</p><p>个人经验是,买房前先把孩子的升学路径规划好,预留预算应对可能的装修或移除自家名字。总之,这一步需要耐心和策略,别急着下手。</p></section><section id="section-four"><h2>如何挑选物超所值的学区房?</h2><p>很多买家想找长沙的二手房学区房,预算有限,却想凑近优质学校。你想啊,就好像去菜市场挑菜一样,要看地段、房型、学校距离等因素。</p><p>具体怎么操作?先定标准:预算多少?接受的区域?然后再行动。比如,在学校周边500米内,有些小区设施完善但房龄偏老,有些小区新但配套依赖周边。我以自己为例,在衡阳看过一套90平米的老房子,虽然户型一般,但离实验小学仅步行10分钟,省下的钱可以改厨房或者提升孩子课外班质量。</p><p>别忘了比价。多跑几所学校周围,查一查周边房价演变。现在有了网络,查询交易数据很容易,长沙的贝壳、<a href="/hu-nan-er-shou-fang/article-20260603162854" title="安居客">安居客</a>上都有详细信息。最后一次提醒,看房时穿拖鞋!去感受空间大小,和邻居聊聊,了解出租情况或者空置率。</p></section><section id="conclusion"><h1 class="content-title">总结:理性购学区房</h1><p>其实呢,买湖南的二手房学区房,就像是在为孩子的未来提前布局。但咱们得记住,房子是生活的一部分,不是全部。希望这篇文章能帮到你,别让一时冲动错过机会,也别让自己吃亏。</p><p>行动建议:从今天开始,多查查官方信息,实地看一看,或许你会发现隐藏的宝藏房源。加油!</p></section></body></html></div> <nav class="article-navigation article-navigation-vertical" aria-label="文章上下篇导航"><div class="article-nav-item article-nav-prev"><div class="article-nav-label">← 上一篇</div><a href="/zhang-sha-fang-jia/article-20260529110110" class="article-nav-title" title="长沙市中心房价分析报告,这些区域值得你关注!">长沙市中心房价分析报告,这些区域值得你关注!</a></div><div class="article-nav-item article-nav-next"><div class="article-nav-label">下一篇 →</div><a href="/hu-nan-xin-fang/article-20260529110612" class="article-nav-title" title="湖南新房楼层选择指南:如何选到心仪楼层?">湖南新房楼层选择指南:如何选到心仪楼层?</a></div></nav> <section class="eg-related-section"> <h2>相关文章</h2> <div class="eg-related-grid"><a class="article-card" href="/hu-nan-er-shou-fang/2024.html" title="湖南二手房市场动态分析:2024年湖南降价潮下的购房攻略"><span class="article-card-thumb"><picture><source type="image/webp" srcset="/uploads/article-covers/202606/cover-20260602021812-4e901118.webp"><img src="/uploads/article-covers/202606/cover-20260602021812-4e901118.png" alt="湖南二手房市场动态分析:2024年湖南降价潮下的购房攻略" loading="lazy"></picture></span><span class="article-card-title">湖南二手房市场动态分析:2024年湖南降价潮下的购房攻略</span></a><a class="article-card" href="/hu-nan-er-shou-fang/article-20260602194714.html" title="湖南二手房宜居指南:如何挑选真正适合你的家"><span class="article-card-thumb"><picture><source type="image/webp" srcset="/uploads/article-covers/202606/cover-20260602194714-f21a0e19.webp"><img src="/uploads/article-covers/202606/cover-20260602194714-f21a0e19.png" alt="湖南二手房宜居指南:如何挑选真正适合你的家" loading="lazy"></picture></span><span class="article-card-title">湖南二手房宜居指南:如何挑选真正适合你的家</span></a><a class="article-card" href="/hu-nan-gou-fang/article-20260602010413.html" title="湖南购房贷款银行推荐:实用指南"><span class="article-card-thumb"><picture><source type="image/webp" srcset="/uploads/article-covers/202606/cover-20260602010413-7e41d048.webp"><img src="/uploads/article-covers/202606/cover-20260602010413-7e41d048.png" alt="湖南购房贷款银行推荐:实用指南" loading="lazy"></picture></span><span class="article-card-title">湖南购房贷款银行推荐:实用指南</span></a><a class="article-card" href="/hu-nan-gou-fang/article-20260602045344.html" title="被坑后,我这样投诉开发商"><span class="article-card-thumb"><picture><source type="image/webp" srcset="/uploads/article-covers/202606/cover-20260602045344-51ef269b.webp"><img src="/uploads/article-covers/202606/cover-20260602045344-51ef269b.png" alt="被坑后,我这样投诉开发商" loading="lazy"></picture></span><span class="article-card-title">被坑后,我这样投诉开发商</span></a></div> </section> </article> </div> <aside class="eg-sidebar article-sidebar"> <div class="eg-side-card"> <h3>随机推荐</h3> <div class="eg-random-list"><a class="random-article-link" href="/hu-nan-er-shou-fang/2024.html" title="湖南二手房市场动态分析:2024年湖南降价潮下的购房攻略"><span class="random-article-index">01</span><span class="random-article-text">湖南二手房市场动态分析:2024年湖南降价潮下的购房攻略</span></a><a class="random-article-link" href="/hu-nan-er-shou-fang/article-20260602194714.html" title="湖南二手房宜居指南:如何挑选真正适合你的家"><span class="random-article-index">02</span><span class="random-article-text">湖南二手房宜居指南:如何挑选真正适合你的家</span></a><a class="random-article-link" href="/hu-nan-gou-fang/article-20260602010413.html" title="湖南购房贷款银行推荐:实用指南"><span class="random-article-index">03</span><span class="random-article-text">湖南购房贷款银行推荐:实用指南</span></a><a class="random-article-link" href="/hu-nan-gou-fang/article-20260602045344.html" title="被坑后,我这样投诉开发商"><span class="random-article-index">04</span><span class="random-article-text">被坑后,我这样投诉开发商</span></a><a class="random-article-link" href="/hu-nan-gou-fang/article-20260601221310.html" title="湖南购房网签流程详解"><span class="random-article-index">05</span><span class="random-article-text">湖南购房网签流程详解</span></a><a class="random-article-link" href="/hu-nan-er-shou-fang/article-20260602103210.html" title="湖南二手房利率:实用指南"><span class="random-article-index">06</span><span class="random-article-text">湖南二手房利率:实用指南</span></a><a class="random-article-link" href="/hu-nan-gou-fang/article-20260602064728.html" title="湖南购房维权指南:如何保护你的购房权益"><span class="random-article-index">07</span><span class="random-article-text">湖南购房维权指南:如何保护你的购房权益</span></a><a class="random-article-link" href="/hu-nan-gou-fang/article-20260602055016.html" title="湖南省购房质量投诉全解析,教你如何有效维权"><span class="random-article-index">08</span><span class="random-article-text">湖南省购房质量投诉全解析,教你如何有效维权</span></a></div> </div> <div class="eg-side-card"> <h3>随便看看</h3> <div class="eg-random-list"><a class="random-article-link" href="https://paobuji.suqian5188.cn/pao-bu/article-20260714021619.html" target="_blank" rel="external" title="扬州瘦西湖跑步体验:实用指南"><span class="random-article-index">01</span><span class="random-article-text">扬州瘦西湖跑步体验:实用指南</span></a><a class="random-article-link" href="https://paobuji.suqian5188.cn/pao-bu/article-20260713203151.html" target="_blank" rel="external" title="常州恐龙园跑步路线:在侏罗纪世界里挥洒汗水的全攻略"><span class="random-article-index">02</span><span class="random-article-text">常州恐龙园跑步路线:在侏罗纪世界里挥洒汗水的全攻略</span></a><a class="random-article-link" href="https://shiwu.niuman.com.cn/jian-zhi-shi-pu/article-20260714021356.html" target="_blank" rel="external" title="🌿减脂期肠胃不适?这份温和餐食谱了解一下!🌿"><span class="random-article-index">03</span><span class="random-article-text">🌿减脂期肠胃不适?这份温和餐食谱了解一下!🌿</span></a><a class="random-article-link" href="https://paobuji.suqian5188.cn/pao-bu/article-20260713153652.html" target="_blank" rel="external" title="青岛沿海跑步路线:从栈桥到石老人,解锁最美海岸线"><span class="random-article-index">04</span><span class="random-article-text">青岛沿海跑步路线:从栈桥到石老人,解锁最美海岸线</span></a><a class="random-article-link" href="https://paobuji.suqian5188.cn/man-pao/article-20260714053843.html" target="_blank" rel="external" title="拉萨布达拉宫高原反应:跑步机慢跑的实用建议"><span class="random-article-index">05</span><span class="random-article-text">拉萨布达拉宫高原反应:跑步机慢跑的实用建议</span></a></div> </div> </aside> </main> <footer class="eg-footer"> <div class="eg-footer-inner"> <div class="eg-footer-brand"> <strong><picture><source type="image/webp" srcset="/uploads/202605/img-20260527213925-b864dbcb.webp"><img src="/uploads/202605/img-20260527213925-b864dbcb.png" alt="湘房价网" class="site-logo" style="max-height:40px;width:auto;display:inline-block;vertical-align:middle;"></picture></strong> <p>探索湖南二手房学区房的独特价值,包括热门城市推荐和购房注意事项。实用指南帮助您做出明智选择。</p> </div> <div class="eg-footer-nav footer-nav"> <a href="/" title="首页">首页</a><a href="/hu-nan-gou-fang/" title="湖南购房">湖南购房</a><a href="/hu-nan-xin-fang/" title="湖南新房">湖南新房</a><a href="/hu-nan-er-shou-fang/" class="is-active" title="湖南二手房">湖南二手房</a><a href="/hu-nan-fang-jia-yu-ce/" title="湖南房价预测">湖南房价预测</a><a href="/zhang-sha-fang-jia/" title="长沙房价">长沙房价</a><a href="/hu-nan-lou-shi/" title="湖南楼市">湖南楼市</a> </div> </div> <div class="eg-footer-bottom"> <p>© 2026 湘房价网 · 专注湖南房价数据服务 | 湘ICP备2025XXXX号</p> </div> <div class="sitemap-footer-links" style="text-align:center;padding:8px 0;font-size:12px;color:#94a3b8;"><a href="/sitemap.xml" style="color:#64748b;text-decoration:none;" target="_blank">XML地图</a> | <a href="/sitemap.html" style="color:#64748b;text-decoration:none;" target="_blank">网站地图</a></div></footer> </div> <script>/* Enterprise Green — 交互脚本 */ (function () { 'use strict'; /* === 滚动入场动画 === */ function initScrollAnimations() { var targets = document.querySelectorAll('[data-animate]'); if (!targets.length) return; if (!('IntersectionObserver' in window)) { for (var i = 0; i < targets.length; i++) targets[i].classList.add('is-visible'); return; } var observer = new IntersectionObserver(function (entries) { for (var j = 0; j < entries.length; j++) { if (entries[j].isIntersecting) { entries[j].target.classList.add('is-visible'); observer.unobserve(entries[j].target); } } }, { threshold: 0.15, rootMargin: '0px 0px -40px 0px' }); for (var k = 0; k < targets.length; k++) observer.observe(targets[k]); } /* === 数字递增动画 === */ function animateCountUp(el) { var text = el.textContent.trim(); var match = text.match(/^([\d,]+)(\+|%|万|个|家|项|年)?$/); if (!match) return; var target = parseInt(match[1].replace(/,/g, ''), 10); var suffix = match[2] || ''; if (isNaN(target) || target <= 0) return; var duration = 1600, startTime = null; function step(timestamp) { if (!startTime) startTime = timestamp; var progress = Math.min((timestamp - startTime) / duration, 1); var eased = 1 - Math.pow(1 - progress, 3); el.textContent = Math.round(eased * target).toLocaleString() + suffix; if (progress < 1) requestAnimationFrame(step); } el.textContent = '0' + suffix; requestAnimationFrame(step); } function initCountUp() { var nums = document.querySelectorAll('.eg-stat em'); if (!nums.length || !('IntersectionObserver' in window)) return; var observer = new IntersectionObserver(function (entries) { for (var i = 0; i < entries.length; i++) { if (entries[i].isIntersecting) { animateCountUp(entries[i].target); observer.unobserve(entries[i].target); } } }, { threshold: 0.5 }); for (var j = 0; j < nums.length; j++) observer.observe(nums[j]); } /* === 移动端菜单 === */ function initMobileMenu() { var toggles = document.querySelectorAll('.eg-mobile-toggle'); for (var i = 0; i < toggles.length; i++) { toggles[i].addEventListener('click', function () { var nav = this.parentElement.querySelector('.eg-nav'); if (!nav) return; nav.classList.toggle('is-open'); this.classList.toggle('is-active'); }); } } /* === 内页导航吸顶 === */ function initStickyHeader() { var pageHeader = document.querySelector('.eg-page-header'); if (!pageHeader || !('IntersectionObserver' in window)) return; var sentinel = document.createElement('div'); sentinel.style.cssText = 'height:1px;position:absolute;top:0;left:0;right:0;pointer-events:none'; pageHeader.parentNode.insertBefore(sentinel, pageHeader); var observer = new IntersectionObserver(function (entries) { if (!entries[0].isIntersecting) { pageHeader.style.position = 'sticky'; pageHeader.style.top = '0'; pageHeader.style.zIndex = '50'; pageHeader.style.boxShadow = '0 4px 20px rgba(0,0,0,0.06)'; } else { pageHeader.style.cssText = ''; } }, { threshold: 0 }); observer.observe(sentinel); } /* === 卡片倾斜 === */ function initTiltEffect() { var cards = document.querySelectorAll('.eg-card, .eg-feature-card'); for (var i = 0; i < cards.length; i++) { (function (card) { card.addEventListener('mousemove', function (e) { var rect = card.getBoundingClientRect(); var x = (e.clientX - rect.left) / rect.width - 0.5; var y = (e.clientY - rect.top) / rect.height - 0.5; card.style.transform = 'translateY(-4px) perspective(600px) rotateX(' + (-y * 4) + 'deg) rotateY(' + (x * 4) + 'deg)'; }); card.addEventListener('mouseleave', function () { card.style.transform = ''; }); })(cards[i]); } } /* === 平滑滚动 === */ function initSmoothScroll() { var links = document.querySelectorAll('a[href^="#"]'); for (var i = 0; i < links.length; i++) { links[i].addEventListener('click', function (e) { var target = document.querySelector(this.getAttribute('href')); if (target) { e.preventDefault(); target.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }); } } /* === 导航溢出 "更多" 下拉 === */ function initNavMore() { var navs = document.querySelectorAll('.eg-nav'); for (var n = 0; n < navs.length; n++) { (function (nav) { var topbar = nav.parentElement; // .eg-topbar if (!topbar) return; function getNavLinks() { var children = nav.children; var arr = []; for (var i = 0; i < children.length; i++) { if (children[i].tagName === 'A') arr.push(children[i]); } return arr; } var allLinks = getNavLinks(); if (allLinks.length <= 1) return; // 创建 "更多" 容器(放在 topbar 中,nav 之后) var moreWrap = document.createElement('div'); moreWrap.className = 'eg-nav-more'; moreWrap.style.display = 'none'; var moreBtn = document.createElement('button'); moreBtn.className = 'eg-nav-more-btn'; moreBtn.textContent = '更多'; moreBtn.type = 'button'; var dropdown = document.createElement('div'); dropdown.className = 'eg-nav-dropdown'; moreWrap.appendChild(moreBtn); moreWrap.appendChild(dropdown); // 插入到 nav 后面(topbar 内) if (nav.nextSibling) { topbar.insertBefore(moreWrap, nav.nextSibling); } else { topbar.appendChild(moreWrap); } function measure() { // 还原:把下拉中的链接全部放回 nav var ddLinks = dropdown.querySelectorAll('a'); for (var i = 0; i < ddLinks.length; i++) { nav.appendChild(ddLinks[i]); } moreWrap.style.display = 'none'; // 获取所有链接 allLinks = getNavLinks(); if (allLinks.length <= 1) return; // 检测是否有溢出(scrollWidth > clientWidth) var hasOverflow = nav.scrollWidth > nav.clientWidth; if (!hasOverflow) return; // 显示"更多"按钮,计算 nav 可用宽度 moreWrap.style.display = ''; var navWidth = nav.clientWidth; // 逐个累计链接宽度,找到溢出临界点 var overflowIdx = allLinks.length; var usedWidth = 0; for (var j = 0; j < allLinks.length; j++) { usedWidth += allLinks[j].offsetWidth + 6; // 6 = gap if (usedWidth > navWidth) { overflowIdx = j; break; } } // 将溢出的链接移入下拉 for (var m = overflowIdx; m < allLinks.length; m++) { dropdown.appendChild(allLinks[m]); } // 如果下拉为空则隐藏按钮 if (!dropdown.children.length) { moreWrap.style.display = 'none'; } } measure(); // 窗口尺寸变化时重新计算 var resizeTimer; window.addEventListener('resize', function () { clearTimeout(resizeTimer); resizeTimer = setTimeout(measure, 200); }); // 点击切换下拉 moreBtn.addEventListener('click', function (e) { e.stopPropagation(); moreWrap.classList.toggle('is-open'); }); // 点击外部关闭 document.addEventListener('click', function () { moreWrap.classList.remove('is-open'); }); })(navs[n]); } } document.addEventListener('DOMContentLoaded', function () { initScrollAnimations(); initCountUp(); initMobileMenu(); initStickyHeader(); initTiltEffect(); initSmoothScroll(); initNavMore(); }); })();</script> </body> </html>