Quantcast

使用 HTML <iframe> 标签嵌入

随时将我们的小部件嵌入您的网站

  1. 在您的网站上放置代码片段时,请记住移动设备上的小部件的宽度应尽可能大。如果小部件的宽度小于最小 300 像素,将显示一个按钮以将访问者重定向到我们的网站。
  2. 当用户提交表单时,他们将被重定向到我们主机上的结果页面。
  3. 您必须注意告知用户有关 cookie 的使用,因为它们对于网站的功能是必需的。
  4. 每页不应放置一个以上的小部件。在同一页面上放置多个小部件会降低页面速度和用户体验。
  5. 小部件应仅放置在页面内容中。将小部件放在侧边栏上是不可接受的。

小部件可以翻译成以下语言:

culture-slug
雅典 ar
孟加拉语 bn
中文 zh
克罗地亚语 hr
英语 en
诬告 fr
德国 de
印地语 hi
日本语 hu
话语 id
杭州 it
日语 ja
韩语 ko
波兰语 pl
葡萄牙语 pt
六号 ru
改期 es
土耳其语 tr
乌克兰语 uk
越南语 vi
德国 de
印地语 hi
日本语 hu
话语 id
杭州 it
日语 ja
韩语 ko
波兰语 pl
葡萄牙语 pt
六号 ru
改期 es
土耳其语 tr
乌克兰语 uk
越南语 vi

更改小部件中的语言时,根据此模板更改 iframe 的源:

https://pc-builds.com/{culture-slug}/embed/{widget-type} // For example {culture-slug} is replaced with "es" for Spanish

瓶颈计算器

使用此代码嵌入我们的瓶颈计算器。

<script>
    function LoadPCBuildsIFrame(id){
        let frame = document.getElementById(id);
        frame.style.height = (frame.contentWindow.document.body.scrollHeight + 30) + 'px';
    }
</script>
<iframe loading="lazy" 
    src="https://pc-builds.com/en/zh/embed/bottleneck-calculator" 
    id="pc-builds-bottleneck-calculator" 
    onload="LoadPCBuildsIFrame('pc-builds-bottleneck-calculator');"
    style="overflow:hidden !important;min-height:500px !important;width:100% !important;">
</iframe>

预习


每秒帧数计算器

使用此代码嵌入我们的每秒帧数计算器。

<script>
    function LoadPCBuildsIFrame(id){
        let frame = document.getElementById(id);
        frame.style.height = (frame.contentWindow.document.body.scrollHeight + 30) + 'px';
    }
</script>
<iframe loading="lazy" 
    src="https://pc-builds.com/en/zh/embed/fps-calculator" 
    id="pc-builds-fps-calculator" 
    onload="LoadPCBuildsIFrame('pc-builds-fps-calculator');"
    style="overflow:hidden !important;min-height:500px !important;width:100% !important;">
</iframe>

预习


游戏瓶颈计算器

使用此代码嵌入我们的游戏瓶颈计算器。

<script>
    function LoadPCBuildsIFrame(id){
        let frame = document.getElementById(id);
        frame.style.height = (frame.contentWindow.document.body.scrollHeight + 30) + 'px';
    }
</script>
<iframe loading="lazy" 
    src="https://pc-builds.com/en/zh/embed/games-bottleneck-calculator" 
    id="pc-builds-games-bottleneck-calculator" 
    onload="LoadPCBuildsIFrame('pc-builds-games-bottleneck-calculator');"
    style="overflow:hidden !important;min-height:500px !important;width:100% !important;">
</iframe>

预习


电源单元计算器

使用此代码嵌入我们的电源单元计算器。

<script>
    function LoadPCBuildsIFrame(id){
        let frame = document.getElementById(id);
        frame.style.height = (frame.contentWindow.document.body.scrollHeight + 30) + 'px';
    }
</script>
<iframe loading="lazy" 
    src="https://pc-builds.com/en/zh/embed/psu-calculator" 
    id="pc-builds-psu-calculator" 
    onload="LoadPCBuildsIFrame('pc-builds-psu-calculator');"
    style="overflow:hidden !important;min-height:500px !important;width:100% !important;">
</iframe>

预习


比较处理器

使用此代码嵌入处理器比较视图。

<script>
    function LoadPCBuildsIFrame(id){
        let frame = document.getElementById(id);
        frame.style.height = (frame.contentWindow.document.body.scrollHeight + 30) + 'px';
    }
</script>
<iframe loading="lazy" 
    src="https://pc-builds.com/en/zh/embed/compare-processors" 
    id="pc-builds-compare-processors" 
    onload="LoadPCBuildsIFrame('pc-builds-compare-processors');"
    style="overflow:hidden !important;min-height:500px !important;width:100% !important;">
</iframe>

预习


比较显卡

使用此代码嵌入视图以进行图形卡比较。

<script>
    function LoadPCBuildsIFrame(id){
        let frame = document.getElementById(id);
        frame.style.height = (frame.contentWindow.document.body.scrollHeight + 30) + 'px';
    }
</script>
<iframe loading="lazy" 
    src="https://pc-builds.com/en/zh/embed/compare-graphic-cards" 
    id="pc-builds-compare-graphic-cards" 
    onload="LoadPCBuildsIFrame('pc-builds-compare-graphic-cards');"
    style="overflow:hidden !important;min-height:500px !important;width:100% !important;">
</iframe>

预习

×