当前位置:网站首页>如何在 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 不仅允许您以合乎道德的方式分享他人的材料,而且还允许您显示视频和音频文件,而无需将它们存储在您自己的网站上。
边栏推荐
- To prevent enterprise data leakage, use the fortress machine of network security products!
- Introduction to radar antenna
- Taro2.* 小程序配置分享微信朋友圈
- Complex convolutional neural network: cv-cnn
- What are the advantages of intelligent chat robots? Senior independent station sellers tell you!
- C#学习二:堆和栈
- leetcode:42. 接雨水【双指针很优雅】
- The way of enterprise transformation and upgrading: digital transformation, thinking first
- Kotlin annotation declaration and use
- C learning 2: heap and stack
猜你喜欢

12.UDP协议-bite

架构实战营模块五作业

Flink SQL task taskmanager memory settings

GWD:基于高斯Wasserstein距离的旋转目标检测 | ICML 2021

When easygbs calls the interface for obtaining real-time snapshots, how to solve the problem of white squares?

STM32与GD32笔记

MySQL XA distributed transaction

cmake学习-2

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

12.udp protocol -bite
随机推荐
postgresql源码学习(24)—— 事务日志⑤-日志写入WAL Buffer
About sql+nosql: newsql database
Taro2.* 小程序配置分享微信朋友圈
What is the time complexity of the redis command?? (the actual question is about the underlying structure of redis)
Why MySQL chooses b+ tree to store indexes
C. Where‘s the Bishop?
It is expected to significantly improve the computational performance of integrated photonic circuits. The Tsinghua team proposed a diffraction pattern neural network framework
Dynamically listening for DOM element height changes
Aleph Farms聘请监管事务主管,提前为全球商业化做好准备
Is there any lack of dependence? An error is reported when flinksql is packaged and running, but there is no problem when the local idea runs. Solve it. Thanks
DataKit 作为本地获取数据的 API 服务器
Leetcode-234-palindrome linked list
TDesign, which gave us benefits last time, will tell us its open source story today
【crossbeam系列】5 crossbeam-util和crossbeam-queue:一些实用的小东西
Numpy 的研究仿制 1
Cmake learning-2
LeetCode-234-回文链表
89.(cesium篇)cesium聚合图(自定义图片)
. Net program configuration file operation (INI, CFG, config)
LeetCode-64-最小路径和