首页 > 解决方案 > 如何在 html 5 中的画布上设置其他站点?

问题描述

我想在我的网站(如浏览器)中打开 google.com,我可以在画布上设置网站吗?或者有什么办法解决?

<img id="scream" src="https://www.google.com/" alt="The Scream" width="220" height="277">

标签: javascripthtmlwebhtml5-canvas

解决方案


您可以使用iframe标记,如下所示:

<iframe style="width: 100%; height: 300px; overflow: hidden" src="https://www.google.com/webhp?igu=1"></iframe>


推荐阅读