这是一个关于b站分享的视频在网站里自适应宽高的代码分享,纯css定位实现并没有什么科技含量,适用于任何主题,可以让编辑器里面的填写的b站视频在pc/移动端自适应宽高
代码参考:


 


<div style="position: relative; padding-bottom: 56.25%; height: 0px; overflow: hidden;">

<iframe src="//player.bilibili.com/player.html?isOutside=true&aid=113394787031382&bvid=BV1KBSqYjEBA&cid=26528321531&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>

</div>

<div style="position: relative; padding-bottom: 56.25%; height: 0px; overflow: hidden;">
    <iframe src="//player.bilibili.com/player.html?isOutside=true&aid=113394787031382&bvid=BV1KBSqYjEBA&cid=26528321531&p=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
 </div>