【发布时间】:2018-06-15 12:03:32
【问题描述】:
我希望在我的网站中嵌入 Ted 演讲,但希望居中。
iframe 在多个 div 中,所以我在隔离和编码必要的参数时遇到了一些麻烦。
当前代码:
<div style="max-width:854px"><div style="position:relative;height:0;padding-bottom:56.25%"><iframe src="https://embed.ted.com/talks/derek_sivers_keep_your_goals_to_yourself" width="854" height="480" style="position:absolute;left:0;top:0;width:100%;height:100%" frameborder="0" scrolling="no" allowfullscreen></iframe></div></div>
【问题讨论】:
-
您需要包含完全复制所描述问题的工作示例才能获得所需的解决方案。
标签: html css iframe alignment center