

代码如下,本站现在也在用具体效果请看底部文章。
<style> section { width: 100%; height: 0; padding-top: 75% /* 4:3 */ position: relative; } section video { position: absolute; top: 0; left: 0; right: 0; bottom: 0; } </style> <section> <video /> </section>
本站使用代码:
<div style="width: 100%; height: 0; padding-top: 75%; position: relative;"><iframe id="Player" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0;" src="https://player.youku.com/embed/XNDU5MzI1MTUxMg==" width="100%" height="100%" scrolling="no" allowfullscreen="allowfullscreen"></iframe></div>
演示效果: