释放双眼,带上耳机,听听看~!
因为之前引入B站上面的视频至文章,复制了官方提供的代码,提供的效果不理想,所以在网上找到了方法,分享给大家!
插入B站视频代码
<iframe id="spkj" src="https://player.bilibili.com/player.html?aid=视频AV号&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>
插入ACfun视频代码
<iframe id="spkj" src="https://www.acfun.cn/player/视频ac号" 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> <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>
B站视频演示:
A站视频演示:
[…] 文章来源:空白木博客 […]
收藏《WordPress B站和A站视频插入文章》文章