<html>
<head>
<style type="text/css">

  .aspect-ratio {
   position: relative;
   width: 100%;
   height: 0;
   padding-bottom: 75%;
    }
.aspect-ratio iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}</style>

</head>
<body>

    <h1> test </h1>

<div class="aspect-ratio" >

        <iframe src="https://player.bilibili.com/player.html?aid=56850347&cid=99299213&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts"> </iframe>

</div>
</body>
</html>

参考: https://blog.csdn.net/xinshou_caizhu/article/details/94028606?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param