如果自己插入过 B 站视频的话基本都会遇到过视频播放显示不全的问题。
B 站视频下放给出的默认嵌入代码是:
<iframe src="//player.bilibili.com/player.html?aid=925341116&bvid=BV1gT4y1V7VR&cid=181133425&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>
直接用这个代码插入后是这样的:
其实只需要改一下嵌入代码即可
使用下方两种代码嵌入:
我们使用过程中将//player.bilibili.com/player.html?aid=925341116&bvid=BV1gT4y1V7VR&cid=181133425&page=1 这个视频地址换成你要插入的地址即可。
第一种
<iframe id="spkj" src="//player.bilibili.com/player.html?aid=925341116&bvid=BV1gT4y1V7VR&cid=181133425&page=1" width="100%" frameborder="no" scrolling="no" allowfullscreen="allowfullscreen"> <span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span> </iframe> <script type="text/javascript"> document.getElementById("spkj").style.height=document.getElementById("spkj").scrollWidth*0.76+"px"; </script>
效果如下:
第二种
<iframe src="//player.bilibili.com/player.html?aid=925341116&bvid=BV1gT4y1V7VR&cid=181133425&page=1" width="100%" height="500" frameborder="0" scrolling="no" sandbox="allow-top-navigation allow-same-origin allow-forms allow-scripts" allowfullscreen="allowfullscreen"></iframe>
效果如下:
「点点赞赏,手留余香」
还没有人赞赏,快来当第一个赞赏的人吧!

予人玫瑰,手有余香
- 2¥
- 5¥
- 10¥
- 20¥
- 50¥
¥2
WordPress 原比例插入 bilibili 视频 为主题派网版权所有,转载请注明出处,所有资源不提供技术支持。压缩包先解压,然后把主题和插件重新分别压缩再上传到网站,才能正常使用。
你可能也喜欢
- ♥ 人才教育06/16
- ♥ WordPress 开源免费线报主题– baolog06/16
- ♥ 织梦操作系统下载类模板06/16
- ♥ WordPress 免费导航主题-简约大气昼夜免费导航-NDNAV06/16
- ♥ WordPress 接入谷歌 OAuth 注册登录教程06/16
- ♥ 红色响应式英文化妆美容类织梦模板(支持移动设备)06/16