2016-11-29 61 views
0

实现当我收到下面的验证错误在控制台中定义的amp-iframeAMP - 溢出元素必须为可调整大小的帧

<amp-iframe width="600" height="140" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable src="https://mydomain/page.html"></amp-iframe> 

溢出元素必须为可调整大小的帧

定义

任何想法如何解决这个问题?

回答

1

我找到了解决方案。

的放大器文档指出的amp-iframe必须overflow子元素,因此:

<amp-iframe width="600" height="140" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable src="https://mydomain/page.html"> 
<div overflow tabindex=0 role=button aria-label="">Read more...</div> 
</amp-iframe> 

解决了这个问题。