示例

步骤

  1. 从b站复制视频代码
    image-1651594096012
    复制出来是这么一坨
<iframe src="//player.bilibili.com/player.html?aid=683543453&bvid=BV1fS4y1c7Cd&cid=585405069&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>
  1. 粘贴模板
模板
<div style="position: relative; padding: 30% 45%;">
<iframe style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"src="//player.bilibili.com/player.html?aid=683543453&bvid=BV1fS4y1c7Cd&cid=585405069&page=1"scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts"></iframe>
</div>

把src=后面那一段用1里的替换。

Q.E.D.


寄蜉蝣于天地,渺沧海之一粟