当前位置:网站首页>如何在 WordPress 中嵌入 iFrame
如何在 WordPress 中嵌入 iFrame
2022-06-29 15:37:00 【华为云】
Iframe 是一种将网页嵌入到另一个页面的内容中的方法。这是通过使用 HTML 元素、外部网站的 URL 以及窗口在您的网站上的外观参数来实现的。
如何在 WordPress 中使用 iframe:构建 iframe 的方法有多种,就像您希望在许多实例中使用其中一种一样。我们将通过一种最常见的方式将 iframe 添加到您的 WordPress 网站。
手动将 iFrame 添加到 WordPress 页面:
将 iframe 添加到页面只需要一行代码。需要打开和关闭 HTML 元素以及网页的 URL。
语法:
<iframe src="example.com"></iframe>嵌入 WordPress 页面的步骤:
第 1 步:转到您希望 iframe 出现的页面。

第 2 步:单击添加(+)块按钮并从弹出窗口中选择 HTML。

第 3 步:在要嵌入的页面的编辑器中插入 iframe 标记。

注意:需要注意源 URL 的一些限制。首先,iframe 可能只显示来自与您使用相同超文本传输协议 (HTTP) 的网站的内容。换句话说,如果您的站点是 HTTPS,则您只能嵌入来自其他 HTTPS 站点的信息。同样,如果您使用 HTTP,则您可能只包含使用 HTTP 的 URL。
第 4 步:要保存进度并发布页面,请单击“发布”按钮。

第 5 步。您的页面现在应该类似于以下屏幕。

有关 iframe 标记的更多信息:
如果您能够采用此策略,请记住您也可以更改您的 iframe 以适应您网站的需求。Iframe 参数开始发挥作用。以下是一些最常见的。
- Allow:使用此参数,您可以指定您的 iframe 是否应具有某些默认行为或功能。
- 高度:高度参数设置网页上 Iframe 窗口的像素大小。
- 宽度:此选项允许您选择 Iframe 的宽度(以像素为单位)。
例如,窗口大小为 1080 x 720 像素,启用全屏查看并设置为在网页其余部分后下载的 iframe 如下所示。
<iframe src="https://example.com" width="1080" height="720" allow="fullscreen"></iframe>摘要:保持您的网站顺利运行,同时仍然遵守法律,这一点至关重要。Iframe 不仅允许您以合乎道德的方式分享他人的材料,而且还允许您显示视频和音频文件,而无需将它们存储在您自己的网站上。
边栏推荐
- swift JSONSerialization
- Neural network for remote sensing image processing
- 14.IP协议-bite
- 2022 OpenVINO DevCon 大揭秘!英特尔携众多合作伙伴深化开发者生态建设,释放AI产业创新潜能
- Kotlin annotation declaration and use
- C # learning 1: value type and reference type
- Mysql database naming conventions PDF
- Timecho of Tianmou technology completed Angel round financing of nearly RMB 100 million and built the original time series database of the industrial Internet of things around Apache iotdb
- PostgreSQL source code learning (23) -- transaction log ④ - log assembly
- 12.udp protocol -bite
猜你喜欢

12.UDP协议-bite

2022年第一季度保险服务数字化跟踪分析

企业转型升级之道:数字化转型,思想先行

防范企业数据泄露,就用网络安全产品堡垒机!

火山引擎入选国内首个《边缘计算产业全景图》

Middle order and post order traversal to construct binary tree [recursive partition interval and backtracking splicing subtree + similarity and difference between middle post order and middle pre orde

面试官:说一下MySQL事务隔离级别?

Leetcode-64- minimum path sum

智能聊天机器人的优势在哪里?资深独立站卖家告诉你!

mysql XA 分布式事务
随机推荐
Where has lifeifei reached in his key "embodied intelligence"?
89. (cesium article) cesium aggregation diagram (custom picture)
European standard plug en50075 test items
MySQL XA distributed transaction
Digital tracking analysis of insurance services in the first quarter of 2022
LeetCode-470-用Rand7()实现Rand10()
【大家的项目】 Rbatis ORM官网上线
Google software version experience cycle
#夏日挑战赛# HarmonyOS - 方舟开发框架ArkUI 流光按钮效果
The role of each layer in convolutional neural network
【crossbeam系列】5 crossbeam-util和crossbeam-queue:一些实用的小东西
PostgreSQL source code learning (23) -- transaction log ④ - log assembly
Alibaba cloud experience Award: use polardb-x and Flink to build a large real-time data screen
Timecho of Tianmou technology completed Angel round financing of nearly RMB 100 million and built the original time series database of the industrial Internet of things around Apache iotdb
C # learning 1: value type and reference type
CVPR 2022 | 大幅减少零样本学习所需的人工标注,马普所和北邮提出富含视觉信息的类别语义嵌入
智能聊天机器人的优势在哪里?资深独立站卖家告诉你!
Daily / June 29, 2022: where is Li Feifei's focus on "embodied intelligence"?
Kotlin annotation declaration and use
云原生数据库查询优化-统计信息与行数估计