因为之前引入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>
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。