例子:-
<amp-lightbox id="my-lightbox" layout="nodisplay">
<div class="lightbox" on="tap:my-lightbox.close" role="button" tabindex="0">
<amp-iframe width="350" height="300" layout="fixed" sandbox="allow-scripts allow-same-origin allow-popups" frameborder="0" src="https://ampbyexample.com/"></amp-iframe>
</div>
</amp-lightbox>
<button class="ampstart-btn caps m2" on="tap:my-lightbox" role="button" tabindex="0">Open Iframe in Lightbox</button>
Run Code Online (Sandbox Code Playgroud)
我还尝试从顶部操纵 iFrame 75% 或 600px 的位置,但它也不起作用。
AMP iFrame 包含 Jquery UI 日历,我们希望使用它来获取用户在我们的 AMP 页面中选择的交付日期。
是否可以在 AMP iFrame 中获取和传递值?
amp-html ×1