javascript - 如何在 html 5 中的画布上设置其他站点?
问题描述
我想在我的网站(如浏览器)中打开 google.com,我可以在画布上设置网站吗?或者有什么办法解决?
<img id="scream" src="https://www.google.com/" alt="The Scream" width="220" height="277">
解决方案
您可以使用iframe标记,如下所示:
<iframe style="width: 100%; height: 300px; overflow: hidden" src="https://www.google.com/webhp?igu=1"></iframe>
推荐阅读
- python - 由于在 EMR 上使用 pyspark 和 Presto 时套接字连接超时,无法对数据帧执行任何功能
- c# - 删除父对象后如何存储值
- python - 等待 DB 的进程(处理操作错误)
- java - 验证数字是否在给定范围内有效,具体取决于使用的预选
- python - Python 魔法无法识别正确的内容
- php - Eclipse 在更改外观或代码格式化程序后丢失了快捷方式
- typescript - 打字稿错误:TS7053 元素隐式具有“任何”类型
- oracle - Oracle:使用 avg 函数选择多个列
- ios - RxSwift Textfield debounce subscribe 没有调用
- bash - Delete last character from line that contains specific word