WordPress 插入Bilibili视频
文章转载自bianhb博客
比如以下由Bilibili提供的代码:
<iframe src="//player.bilibili.com/player.html?aid=755757862&bvid=BV1Lr4y1F7fW&cid=271387869&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>
可以对长宽进行设置:
<iframe src="//player.bilibili.com/player.html?aid=28517524&cid=49353923&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" width="700" height="500"> </iframe>
然后插入到html编辑器中,并且将视频居中,就成如下的内容了:
<p align="center"><iframe src="//player.bilibili.com/player.html?aid=930691322&bvid=BV19K4y197hB&cid=342471775&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" width="700" height="500"> </iframe>
另一种方法(可自适应设备大小):
<div style="position: relative; padding: 30% 45%;">
<iframe style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;src="src="//player.bilibili.com/player.html?aid=930691322&bvid=BV19K4y197hB&cid=342471775&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" ></iframe>
</div>
评论已关闭