因为之前引入B站上面的视频至文章,复制了官方提供的代码,提供的效果不理想,所以在网上找到了方法,分享给家!

插入B站视频代码

<iframe id="mnrz" src="https://player.bilibili.com/player.html?aid=视频AV号&amp;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("mnrz").style.height=document.getElementById("mnrz").scrollWidth*0.76+"px"; </script>

插入ACfun视频代码

<iframe id="mnrz" 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("mnrz").style.height=document.getElementById("mnrz").scrollWidth*0.76+"px"; </script>