這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Responsive iframe

外掛說明

A Responsive Iframe that will resize itself to its parent element.

Instructions

Install

The plugin manager is located on the administration page. From the administration page in the left side bar click Plugins. From the top of the page click add new.

Install the plugin thru the plugin manager, or upload it as a zip file into the plugin manager.

Use

  • Apply responsive iframe
    Create a post like you normally would and then click the + icon displayed to Add block. Find Responsive iframes and click it.
    By default your current website will be displayed in the iframe.

  • Block Settings
    Site Address – The url address of the website you want to iframe
    Width – This represents the actual width you want to display from the iframed website.
    Height – This represents the actual height you want to display from the iframed website.
    Scrollbar – Displays a scroll bar if the height,and width are smaller than the iframe website.
    Border – Dislays a default border around the iframe element.
    Scale – This will change the max-width percentage of the iframe’s parent element, it will allow the element to be scaled by size.
    Additional CSS – Any additional CSS will be applied to the iframe’s parent element. Use this to provide some additional styling.

  • BreakPoints
    Available under advanced settings, and will let you specify the width of the site to display depending on the width of the device.
    Multiple breakpoints can be used. The lowest BreakPoint Width will take effect over any higher BreakPoint Widths when the screen device is below or at its BreakPoint Width.
    Example Breakpoint 1 250px, Breakpoint 2 350px. A device with a screen width of 250px will only trigger Breakpoint 1. ScreenWidth 251px, will only trigger BreakPoint 2.
    Name – The name you wish to give the breakpoint
    BreakPoint Width – At and below this width, this breakpoint is triggered.
    Site Width – This is the width of the website to display when the breakpoint is triggered

螢幕擷圖

  • Example of New York Times in an iframe.
  • The iframe in the website, demonstrating from a mobile viewpoint.
  • The iframe in the website, demonstrating from a desktop viewpoint.

適用於區塊編輯器

這個外掛提供 2 個可供 Gutenberg/區塊編輯器使用的區塊。

  • Responsive iframes
  • Responsive iframe

常見問題集

How do I access the block settings

In the page where you create a post, in the top right corner next to update/publish is a cog wheel that allows you to edit block settings.

In the editor I can’t click on the iframe

Click directly underneath the iframe element, you want to select the block so you can edit it.
Top ToolBar on the page also has three horizontal lines that let you select your blocks in the editor.

What can I stylize without breaking the iframe

Leave the iframe element largly alone, focus css on the parent div element.
Do not modify the height on the div element.

使用者評論

2022 年 10 月 19 日
Solved my struggle to fit a site into wordpress iframe!
2022 年 9 月 25 日
simple and efficient, bravo
2021 年 12 月 28 日 1 則留言
I tried so many different plugins and they were so convoluted. I have an iframe that I want to embed a page from another domain (ie cross-domain iframe) and all of the 8 other plugins I downloaded wanted me to modify the source file that I wanted to embed and/or mess with embed codes in wordpress, or a bunch of other mess. I installed this plugin, clicked the + sign and added the responsive block, pasted my url and the site came up instantly and is responsive in all views. I haven't even had to touch the options which the other plugins want to charge for. IT JUST WORKS! Thanks so much. You saved me so much time on my workflow because for each video I create on my off-site video hosting place, I have to embed those html files into each wordpress page/post (probably will be over 200 videos) and you just made that a one click & paste process. All the best.
2021 年 9 月 4 日
automatically resize my frame for every device and compatible with any browser. I really recommend it.
閱讀全部 6 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Responsive iframe〉的開發相關工作。

參與者

將〈Responsive iframe〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.2.0

  • Added to advanced settings the ability to add breakpoints to the iframe.

1.1.1

  • Max Width setting now using px instead of REM.

1.1.0

  • Adds to advanced settings an option to specify max-width of Iframe

1.0.1

  • updates the readme, and fixes my website link in plugin.php

1.0

  • first release