关闭
当前位置:首页 >> 观点 >> 建站知识

网站页面关键词的布局方法

来源:无锡网站建设阿凡达 浏览次数:767 发表日期:2023-05-18

关键词布局就是将目标关键词合理分配到网站的首页、栏目页以及内容页。在优化一个SEO网站权重沐度解机 其中包含核心关键词、目标关键词、长尾关键词的网站时,首先要考虑的就是关键词的布局。
 
1.认识关键词布局
 
把所有要优化的词那放在首页去优化,什么核心关键 上词放首页、什么目标词放在栏目页、什么长尾词放在内容页,都民开隔到指贡时技照常人湖览习惯。首先关注路 上边的特行情,其次 这些都要合理地布局。
 
是屏幕在侧间过栏,*后是中同位置。这个市局就是下型布局,它符合我们的湖息过地,这里所说的于型不是定和字母F完全一样。 还可以是适当的延伸。
 
关键词F型布局在引用过程中所表现的形式~般是 关键词布局在页面的头、中、尾部,这样可以提高关键词与页面相关性,除了可以提高关键词排名还能方便管理。
 
2. 关键词布局方法
 
页面关键词布局策略,通常遵循“关键词金字塔”原则,也就是难度*大的、比较重要的词排在上面一层,通常放在网站首页优化;次一级难度的词,一般分布在栏目页或列表页;底层的是大量的长尾关键词。因此,在进行关键词布局前,首先要清楚网站各类页面与关键词之间的关系。
 
了解了网页与关键词的对应关系后,在优化网站时才能够将关键词合理地布局在对应的网页中。
 
关键词应该布局在页面的哪些位置呢?
 
通常情况下,网站页面中的关键词可以布局在标签、description 属性、keywords 属性、页面body中。<br/> <br/>(1) <title>标签中布局关键词<br/> <br/><title>标签是用来定义网页标题的标签,除了显示在网页源代码中,还会显示在浏览器t: 方的标题栏中,以及搜索结果页中每一个搜索结果的第一行。<br/> <br/>这就说明一个网页的标题与用户搜索的内容越接近就越有优先展示的机会。所以页面<title>标签中要包含关键词,方便用户搜索。另外,搜索引擎会根据<itle>标签中的内容进行索引,在<title>标签中布局关键词,可以提升关键词与页面的相关性,进而影响关键词排名。<title>标签中包含本页面关键词1~3个,这里的关键词数量不是固定值,可以根据页面权重的高低进行增减,但不可罗列太多。<title> 标签中关键词字符数建议控制在80个以内,其中一个汉字等于两个字符。<br/> <br/>在<title>标签中布局关键词时,可以将其设置为“关键词-网站名称”的形式,关键词之间以英文逗号“,”或下划线“”隔开。例如艺龙旅游网优化的核心关键词有“旅游攻略”“穷游”“自由行”“旅游景点”,因此其<title> 标签的内容可以写为“旅游攻略穷游_自由行旅游景点-艺龙旅游网”,如图4.22所示。也可以将<title>标签设置为品牌名,如图4.23所示。需要注意的是,如果品牌知名度较低,则不推荐使用此方法;并且采用此种方法会造成首页<title>资源的浪费,核心关键词得不到*大限度优化。<br/> <br/>(2) description 属性中布局关键词<br/> <br/>description是meta标签里用来描述页面的一个属性,在desription属性中布局关键词,可以提升关键词与页面的相关性,从而影响关键词排名。因此,description属性中要包含页面关键词,字符数建议控制在200个以内。<br/> <br/>页面description 需要围绕目标关键词进行撰写,至少出现一次关键词。 同样以艺龙旅游网为例,其description 就可以写为:“艺龙旅游网是中国**的在线旅行服务提供商之一,靠谱的旅游攻略、海量的旅游景点图片,并有穷游、自由行等全面旅游信息,让你的出行更方便。”<br/> <br/>另外,description中尽量 多搭配相关信息,如经营范围,联系方式等,丰富description的内容。<br/> <br/>(3) keywords属性中布局关键词<br/> <br/>keywords属性用来定义网站的关键词,可以用来调整关键词密度,但是其重要性在逐渐减弱。在优化keywords属性时要注意,避免堆砌关键词,字符数建议控制在100个以内。隔开。撰写keywords属性时,可以将页面的目标关键词罗列在keywords属性中,以英文逗号<br/> <br/>(4) body中布局关键词<br/> <br/>部分的关键词布局方式类似。在body中布局关键词,包括首页、栏目页,内容页的body部分。其中首页与栏目页body。<br/> <br/>1)首页和栏目页body部分关键词的布局。<br/> <br/>关键词呈现F型布局,布局的位置主要包括以下几个方面,以某旅游网站为例:导航和二级导航添加关键词。<br/> <br/>页面内容中添加关键词。在页面中多次出现某个关键词,并在第一次出现时用<strong>标签进行标注,这样搜索引擎会认为该页面是围绕这个关键词来组织内容的,指导搜索引擎来确定网页的关键词。<br/> <br/>2)内容页body部分关键词的布局。<br/> <br/>通常情况下,内容页设置一个长尾关键词,布局的位置包括产品名称或文章标题、文章的首段和尾段、文章中图片的alt属性、文章小标题等。<br/> <br/>通过以上讲解,相信大家也都有了自己的一套<a href="https://www.wxavatar.com/Web.html" target="_blank">网站建设</a>关键词布局方法。但是网页关键词并不是越多越好,而是有一定的密度限制,因此在优化过程中还需要掌握关键词密度的优化方法。<br/></p> <div class="news_show_tag">声明:本站部分内容及图片来自互联网,转载是出于传递更多信息之目的,内容观点仅代表作者本人,如有任何标注错误或版权侵犯请与我们联系(Email:2242241319@qq.com),我们将及时更正、删除,谢谢。</div> <div class="news_show_tag"><span>标签:</span> <a href="https://www.wxavatar.com/tag4557.html">网站页面关键词</a> <a href="https://www.wxavatar.com/tag3059.html">网站布局</a></div> </div> <div class="skip"> <div class="fl">上一篇:<a href="https://www.wxavatar.com/4446.html">网站关键词选择技巧,有哪些需要注意的呢?</a></div> <div class="fr">下一篇:<a href="https://www.wxavatar.com/4450.html">网站发布前需要做些什么?</a></div> </div> <div class="relate_bord"> <div class="relate_tit">随机文章</div> <ul class="relate_news"> <li><span class="date">02-08</span> <dd><a href="https://www.wxavatar.com/njwzjs-16-4.html" target="_blank">南京网站建设的基础域名空间与备案要点</a></dd> </li> <li><span class="date">06-21</span> <dd><a href="https://www.wxavatar.com/5466.html" target="_blank">以生产型网站建设为例 简谈企业网站建设细节</a></dd> </li> <li><span class="date">05-10</span> <dd><a href="https://www.wxavatar.com/wzsjys.html" target="_blank">网站设计要素分析提升用户体验与品牌价值的秘密</a></dd> </li> <li><span class="date">01-29</span> <dd><a href="https://www.wxavatar.com/3196.html" target="_blank">苏州网站建设之前需要做哪些准备</a></dd> </li> <li><span class="date">07-07</span> <dd><a href="https://www.wxavatar.com/chgcgs.html" target="_blank">测绘工程公司响应式网站模板 工程测绘技术公司响应式网站模板 测绘知识门户网站建设</a></dd> </li> <li><span class="date">02-07</span> <dd><a href="https://www.wxavatar.com/njwzjs-15-3.html" target="_blank">南京网站建设行业趋势数字时代的定位与机遇</a></dd> </li> <li><span class="date">05-04</span> <dd><a href="https://www.wxavatar.com/4055.html" target="_blank">从事网站设计都需要学哪些知识呢?</a></dd> </li> <li><span class="date">05-13</span> <dd><a href="https://www.wxavatar.com/4198.html" target="_blank">哪些因素会影响网站权重呢?</a></dd> </li> </ul> </div> </div> <div class="sidebar"> <div class="grayblock"> <dt><i class="iconfont icon-xiaoxi"></i>新上线案例</dt> <ul class="pre_news"> <li> <section><span class="text"><a href="https://www.wxavatar.com/wxshym-20.html" target="_blank">HUAYAN</a></span></section> </li> <li> <section><span class="text"><a href="https://www.wxavatar.com/wxshym.html" target="_blank">无锡市华雁密封件</a></span></section> </li> <li> <section><span class="text"><a href="https://www.wxavatar.com/nbqljm-2.html" target="_blank">Ningbo UNIWISE</a></span></section> </li> </ul> </div> <div class="grayblock"> <dt><i class="iconfont icon-xiaoxi"></i>观点</dt> <ul class="pre_news"> <li> <section><span class="text"><a href="https://www.wxavatar.com/rlzhwx-19-19.html" target="_blank" >热烈祝贺无锡市华雁密封件轴承英文网站正式上线!</a>07-21</span></section> </li> <li> <section><span class="text"><a href="https://www.wxavatar.com/rlzhwx-6-17.html" target="_blank" >热烈祝贺无锡市华雁密封件轴承中文网站正式上线!</a>07-21</span></section> </li> <li> <section><span class="text"><a href="https://www.wxavatar.com/rlzhnb.html" target="_blank" >热烈祝贺宁波齐林精密机械官网正式上线运营</a>07-09</span></section> </li> <li> <section><span class="text"><a href="https://www.wxavatar.com/rlzhsh.html" target="_blank" >热烈祝贺上海小荷展示器材外贸独立站正式上线运营推广</a>07-09</span></section> </li> <li> <section><span class="text"><a href="https://www.wxavatar.com/rlzhdn.html" target="_blank" >热烈祝贺DNYN英文独立站正式上线运营</a>06-18</span></section> </li> <li> <section><span class="text"><a href="https://www.wxavatar.com/rlzhwx-18-19.html" target="_blank" >热烈祝贺无锡速必得英文定制网站正式上线运营</a>06-03</span></section> </li> </ul> </div> <div class="grayblock"> <dt><i class="iconfont icon-biaoqian"></i>热门标签</dt> <ul class="tags_hot" id="tagsPreview"> <a href="https://www.wxavatar.com/tag935.html" target="_blank">高端网站定制</a><a href="https://www.wxavatar.com/tag936.html" target="_blank">网站定制价格</a><a href="https://www.wxavatar.com/tag250.html" target="_blank">外贸网站建站及优化推广</a><a href="https://www.wxavatar.com/tag251.html" target="_blank">外贸网站SEO优化</a><a href="https://www.wxavatar.com/tag252.html" target="_blank">外贸网站seo优化技巧</a><a href="https://www.wxavatar.com/tag991.html" target="_blank">如何设计外贸网站</a><a href="https://www.wxavatar.com/tag329.html" target="_blank">外贸网站设计专业公司</a><a href="https://www.wxavatar.com/tag319.html" target="_blank">外贸网站建设设计</a><a href="https://www.wxavatar.com/tag1216.html" target="_blank">营销型网站建站原则</a><a href="https://www.wxavatar.com/tag1259.html" target="_blank">营销型网站建设10大原则</a><a href="https://www.wxavatar.com/tag81.html" target="_blank">网站优化</a><a href="https://www.wxavatar.com/tag379.html" target="_blank"> 网站关键词优化费用</a><a href="https://www.wxavatar.com/tag338.html" target="_blank">企业网站优化费用</a><a href="https://www.wxavatar.com/tag926.html" target="_blank">外贸网站如何搭建</a> </ul> </div> </div> </div> <div class="container"> <!-- *新案例 --> <div class="relevant-block"> <div class="index-case2"> <div class="wrap-1760"> <div class="relevant-title t-center" aos="fade-up">案例</div> <div class="list2" flex="wrap"> <div class="list2-li lw-w-4" aos="fade-up" aos-delay="100"><a href="https://www.wxavatar.com/shtmsy.html" target="_blank" class="list2-box imgh"> <div class="img-box"><img src="/static/images/nopic.png" width="100%" alt="南京锐聚机电" loading="lazy"></div> <div class="cont"> <div class="list2-title">南京锐聚机电</div> <div class="list2-type">PLC控制柜营销型网站开发 网站设计 logo设计</div> </div> </a> </div> <div class="list2-li lw-w-4" aos="fade-up" aos-delay="100"><a href="https://www.wxavatar.com/yxyzcd.html" target="_blank" class="list2-box imgh"> <div class="img-box"><img src="/static/upload/image/20250308/1741410753739526.png" width="100%" alt="玉鑫压铸厂短视频代运营案例" loading="lazy"></div> <div class="cont"> <div class="list2-title">玉鑫压铸厂短视频代运营案例</div> <div class="list2-type">抖音 快手 B站 小红书</div> </div> </a> </div> <div class="list2-li lw-w-4" aos="fade-up" aos-delay="100"><a href="https://www.wxavatar.com/cp204.html" target="_blank" class="list2-box imgh"> <div class="img-box"><img src="/static/upload/image/20260805/1785910311613291.jpg" width="100%" alt="蒙娜丽莎泳池设备" loading="lazy"></div> <div class="cont"> <div class="list2-title">蒙娜丽莎泳池设备</div> <div class="list2-type">泳池设备网站策划 设计 制作</div> </div> </a> </div> </div> </div> </div> </div> <!-- *新案例 --> </div> </div> <footer> <!--新增尾begin--> <div class="foot_div" style="position:relative; overflow:visible;display: none"> <div class="foot_div_c"> <div class="footlist1"> <dl class="n1"> <dt>我们能做什么</dt> <dd>网站建设,专业提供网站建设,营销型网站建设,外贸网站定制,品牌网站设计,高端网站制作,网站定制,网站开发,网站改版、网站代码优化、网站升级维护及程序开发等,服务范围涵盖基础的域名服务,企业邮箱,网络营销等建站服务,阿凡达拥有一支由多名网络安全专家、软件工程和项目管理专家、网站建设策划专家,为不同类型的客户提供良好的互联网应用定制解决方案,帮助客户在新的全球化互联网环境中保持优势。</dd> </dl> <dl class="n2"> <dt>我们的优势</dt> <dd> <ul> <li>18年网站建设经验</li> <li>18年营销型网站建设经验</li> <li>18年外贸网站建设经验</li> <li>18年网销代运营经验</li> <li>国家高企培育入库</li> <li>双软认证企业</li> <li>完善的售后服务体系</li> <li>深厚的网络运营经验</li> <li>41项软件著作权</li> <li>860+生产型企业见证</li> <li>具有完备的项目管理</li> <li>网站代码深度符合SEO</li> <li>提供前后台网站源码</li> <li>不断更新SEO新技术</li> <li>免费终身售后维护</li> <li>整体符合搜索引擎算法</li> </ul> </dd> </dl> <dl class="n3"> <dt>关于阿凡达</dt> <dd>阿凡达网络一直秉承专业、诚信、服务、进取的价值观,坚持优秀的商业道德,以用户价值为导向,向用户提供优质产品和优质服务,从而赢得了用户的信赖。自2012年以来公司建站业务范围包括无锡梁溪、惠山、滨湖、新吴、锡山、江阴、宜兴以及其它城市深圳、广州、北京、南京、上海、苏州、常州,全国各地接受异地服务商的公司企业或者机构。阿凡达建站公司始终以不懈的努力、更高的目标来要求自己。 已服务的客户有威孚催化剂,日联,北方湖光,虎虎机电,速必得,大鸿液压,玉鑫铝压铸,新华商学院,清联智控,同联,永井,研奇,小黄蜂缠绕机,鑫必承。</dd> </dl> </div> </div> </div> <!--新增尾end--> <!--<div class="ftyl"> <div class="w"> <p>友情链接:</p> <a href="http://www.wxjiebo.com.cn">直读光谱仪</a> <a href="http://www.wxavatar.com.cn">无锡网站建设</a> </div> </div>--> <!--<div class="ftyl"> <div class="w"> <p>相关推荐:</p> <span class="ftyl-more"> </span> <span class="ftyl_link"> <a href="https://www.shyuanzhen.cn/" target="_blank">上海网站建设</a> <a href="https://www.hi0755.net/" target="_blank">深圳网站建设</a> <a href="https://www.unicomp.cn" target="_blank">检测设备</a> </span> </div> </div>--> <div class="foot"> <div class="w"> <div class="foot_text"> <p>Copyright @ 2012 无锡阿凡达网络科技有限公司 版权所</p> <p><a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">苏ICP备13021672号</a></p> <p><a href="https://beian.mps.gov.cn/#/query/webSearch?code=32021302001412" rel="nofollow" target="_blank"> <img width="15px" src="https://beian.mps.gov.cn/web/assets/logo01.6189a29f.png" alt="苏公网安备32021302001412">苏公网安备32021302001412</a> </p> </div> <div class="foot_button"> <ul> </ul> </div> </div> </div> </footer> <!-- links end --> <div class="right_cus"> <ul> <li class="ico2"> <a href="javascript:void(0)" rel="nofollow"></a> <div class="right_wechat"><img src="https://www.wxavatar.com/static/upload/image/20221123/1669195770943583.jpg" width="130" alt="微信"></div> </li> <li class="ico1"> <a href="javascript:;" rel="nofollow"></a> </li> <li class="ico3"> <a href="javascript:void(0)" rel="nofollow"></a> <div class="ServiceHotline"> 17849443943</div> </li> <li class="ico4"><a href="javascript:goTop();" rel="nofollow"></a> </li> </ul> </div> <!-- right_cus end --> <!--<div class="tool"> <div class="tool-top"> <p class="customer-hotline" >免费答疑热线</p> <p class="phone" >400-189-1319</p> <p class="scan-code-text" >添加微信</p> <img src="/static/upload/image/20221123/1669195770943583.jpg" alt="添加微信" class="company-ewm" > </div> <div class="tool-bottom" ><img src="https://www.wxavatar.com/template/default/static/picture/to_topind.png" class="to-top" alt="添加微信"></div> </div>--> <script> const img = document.querySelector('.to-top'); function handleScroll() { const scrollTop = window.scrollY; if (scrollTop >= 600) { img.style.display = 'none'; } else { img.style.display = ''; } } window.addEventListener('scroll', handleScroll); handleScroll(); </script> <!-- tool end --> <div id="bottom"> <ul> <li> <a href="https://www.wxavatar.com/"> <dl> <dt><img src="https://www.wxavatar.com/template/default/static/picture/icon_1.png" width="25" height="25" alt="首页"></dt> <dd>网站首页</dd> </dl> </a> </li> <li> <a href="tel:17849443943" rel="nofollow"> <dl> <dt><img src="https://www.wxavatar.com/template/default/static/picture/icon_2.png" width="25" height="25" alt="咨询电话"></dt> <dd>咨询电话</dd> </dl> </a> </li> <li> <a href="https://www.wxavatar.com/lianxiwomen.html" rel="nofollow"> <dl> <dt><img src="https://www.wxavatar.com/template/default/static/picture/icon_3.png" width="25" height="25" alt="联系电话"></dt> <dd>联系我们</dd> </dl> </a> </li> </ul> </div> <!-- bottom end --> <style> #newBridge .nb-icon-right-center { top: 75%; } </style> <script> var bdm='763c35f7a2e6879ad4016d36284572e0'; if(window.screen.width>786){ bdm='3d84d2bce588d91d24d296dbe746cf81'; } var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?"+bdm; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); function aiff(){ document.getElementById('nb_icon_wrap').click(); } </script> <style> /*foxcms-fixed-container 首页侧边导航栏*开始*/ .foxcms-fixed-container { position: fixed; right: 3px; top: 270px; z-index: 9998; } .foxcms-fixed-content { position: relative; } .ai-open-btn { width: 80px; height: 80px; cursor: pointer; transition: all 0.3s ease; } .ai-open-btn:hover { transform: scale(1.05); } .ai-open-btn img { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); animation: glow-pulse 2s ease-in-out infinite; } @keyframes glow-pulse { 0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4), 0 4px 20px rgba(0, 0, 0, 0.2); } 50% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0), 0 4px 30px rgba(99, 102, 241, 0.3); } 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 4px 20px rgba(0, 0, 0, 0.2); } } .ai-close-btn { position: absolute; z-index: 10001; top: -20px; right: -20px; width: 40px; height: 40px; cursor: pointer; display: none; background: rgba(255, 255, 255, 0.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transition: all 0.3s ease; } .ai-close-btn:hover { background: rgba(255, 255, 255, 0.9); transform: scale(1.05); } .ai-close-btn svg { width: 20px; height: 20px; color: #666; } .ai-iframe-container { position: fixed; right: -60px; bottom: 150px; z-index: 9999; width: 770px; overflow: hidden; background: transparent; border: none; display: none; } .ai-iframe-container iframe { width: 100%; border: none; overflow: hidden; background: transparent; } @media screen and (max-width: 992px) { .foxcms-fixed-container { right: 20px; bottom: 20px; } .ai-open-btn { width: 80px; height: 80px; } .ai-close-btn { z-index: 9999; right: -10px; bottom: 550px; width: 25px; height: 25px; } .ai-close-btn svg { width: 20px; height: 20px; } .ai-iframe-container { width: calc(100vw - 40px); right: 20px; bottom: 120px; } } .foxcms-contact-bar { position: fixed; right: 10px; z-index: 9997; background-color: #fff; border-radius: 30px; padding: 8px 0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); display: flex; flex-direction: column; gap: 8px; margin-top: 10px; } .foxcms-contact-bar .contact-item { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 60px; cursor: pointer; transition: all 0.3s ease; position: relative; } .foxcms-contact-bar .contact-item img { width: 30px; margin-bottom: 5px; } .foxcms-contact-bar .contact-icon { width: 32px; height: 32px; color: #333; margin-bottom: 4px; } .foxcms-contact-bar .contact-text { font-size: 14px; color: #333; line-height: 1; } .foxcms-contact-bar .contact-popup { position: absolute; right: 150px; top: 50%; transform: translateY(-50%); background-color: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 10000; } .foxcms-contact-bar .contact-popup::after { content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 8px; border-color: transparent transparent transparent #fff; } .foxcms-contact-bar .contact-item:hover .contact-popup { opacity: 1; visibility: visible; right: 145px; } .foxcms-contact-bar .contact-tel-popup span { font-size: 18px; font-weight: bold; color: #333; } .foxcms-contact-bar .contact-wechat-popup img { width: 120px; height: 120px; display: block; } @media screen and (max-width: 992px) { .foxcms-contact-bar { right: 20px; bottom: 100px; } } /*foxcms-fixed-container 首页侧边导航栏*结束*/ </style> <div class="foxcms-fixed-container"> <div class="foxcms-fixed-content"> <div id="ai-open-btn" class="ai-open-btn" onclick="openAiIframe()"> <img src="https://www.wxavatar.com/template/default/static/picture/ai.png" width="80" height="80" alt="AI数字人"> </div> <div id="ai-close-btn" class="ai-close-btn" onclick="closeAiIframe()" style="display:none;"> <svg 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> </div> </div> <div class="foxcms-contact-bar"> <div class="contact-item contact-tel" onmouseenter="showContactInfo('tel')" onmouseleave="hideContactInfo('tel')"> <img src="https://www.wxavatar.com/template/default/static/image/phone_icon.svg" alt="phone" /> <span class="contact-text">电话</span> <div class="contact-popup contact-tel-popup"> <span>400-189-1319</span> </div> </div> <div class="contact-item contact-wechat" onmouseenter="showContactInfo('wechat')" onmouseleave="hideContactInfo('wechat')"> <img src="https://www.wxavatar.com/template/default/static/image/wechat_cion.svg" alt="wechat" /> <span class="contact-text">微信</span> <div class="contact-popup contact-wechat-popup"> <img src="https://www.wxavatar.com/template/default/static/image/code_img.jpg" alt="code" /> </div> </div> <div class="contact-item contact-top" onclick="scrollToTop()"> <svg class="contact-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M18 15l-6-6-6 6"></path> </svg> <span class="contact-text">顶部</span> </div> </div> </div> <script> function showContactInfo(type) { var popup = document.querySelector('.contact-' + type + '-popup'); if (popup) { popup.style.opacity = '1'; popup.style.visibility = 'visible'; popup.style.right = '86px'; } } function hideContactInfo(type) { var popup = document.querySelector('.contact-' + type + '-popup'); if (popup) { popup.style.opacity = '0'; popup.style.visibility = 'hidden'; popup.style.right = '86px'; } } function scrollToTop() { window.scrollTo({ top: 0, behavior: 'smooth' }); } var aiIframeUrl = 'https://ai.gangwaninfo.com/dashboard?code=wxavatar&fontSize=90'; function getAiIframeHeight() { var width = window.innerWidth; if (width <= 1920 && width >= 1440) { return '700px'; } else if (width >= 1281 && width < 1440) { return '600px'; } else if (width >= 1025 && width < 1281) { return '550px'; } else if (width >= 768 && width < 1025) { return '500px'; } else { return '680px'; } } function openAiIframe() { if (document.getElementById('ai-iframe')) return; var container = document.createElement('div'); container.id = 'ai-iframe'; container.className = 'ai-iframe-container'; container.style.display = 'block'; container.style.height = getAiIframeHeight(); var iframe = document.createElement('iframe'); iframe.src = aiIframeUrl; iframe.frameBorder = '0'; iframe.allowTransparency = 'true'; iframe.allow = 'microphone; fullscreen; xr-spatial-tracking'; iframe.scrolling = 'no'; iframe.style.height = '100%'; container.appendChild(iframe); var closeBtn = document.createElement('div'); closeBtn.id = 'ai-close-btn'; closeBtn.className = 'ai-close-btn'; closeBtn.innerHTML = '<svg 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>'; closeBtn.onclick = closeAiIframe; closeBtn.style.display = 'flex'; closeBtn.style.position = 'absolute'; closeBtn.style.top = '20px'; closeBtn.style.right = '160px'; closeBtn.style.zIndex = '10001'; container.appendChild(closeBtn); document.body.appendChild(container); var openBtn = document.getElementById('ai-open-btn'); if (openBtn) { openBtn.style.display = 'none'; } } function closeAiIframe() { var iframeContainer = document.getElementById('ai-iframe'); if (iframeContainer) { iframeContainer.remove(); } var closeBtn = document.getElementById('ai-close-btn'); if (closeBtn) { closeBtn.style.display = 'none'; } var openBtn = document.getElementById('ai-open-btn'); if (openBtn) { openBtn.style.display = 'block'; } } window.addEventListener('resize', function() { var iframeContainer = document.getElementById('ai-iframe'); if (iframeContainer) { iframeContainer.style.height = getAiIframeHeight(); } }); </script> <script type="text/javascript" src="https://www.wxavatar.com/template/default/static/layer/layer.js"></script> <script type='text/javascript' src='https://www.wxavatar.com/template/default/static/js/wow.min.js'></script> <script type='text/javascript' src='https://www.wxavatar.com/template/default/static/js/comm.js'></script> <script type='text/javascript' src='https://www.wxavatar.com/template/default/static/js/about.js'></script> <div id="fade" class="black_overlay"></div> </body> </html>