如何在博客园中插入视频、音频、网页
转载自:https://www.cnblogs.com/wengle520/p/12411812.html
详细请参考: https://www.cnblogs.com/wkfvawl/p/12268980.html
一. 插入视频
在随笔中要添加视频的位置处点击插入html
复制如下代码。并将网址中src的aid 和cid改成自己要加入视频的参数就连可以,然后点击更新即可,保存后可查看效果。
<div style="position: relative; padding: 30% 45%;"> <iframe style="position: absolute; 100%; height: 100%; left: 0; top: 0;" src="https://player.bilibili.com/player.html?cid=145147963&aid=84267566&page=1&as_wide=1&high_quality=1&danmaku=0" frameborder="no" scrolling="no"></iframe> </div>
如何获取aid和cid,再B站中点击鼠标移到分享按钮上会出现插入代码的链接:复制如下
标记为红色的即为aid和cid的值
<iframe src="//player.bilibili.com/player.html?aid=839822869&bvid=BV1D54y117xY&cid=242027826&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>
例:
二. 插入网页
与插入视频相同,只不过插入网页直接将网页的网址复制在src后面的引号里面即可:
示例:
<div style="position: relative; padding: 30% 45%;"> <iframe style="position: absolute; 100%; height: 100%; left: 0; top: 0;" src="https://www.lovestu.com/api/project/cnmapyinqing/obj.php" frameborder="no" scrolling="no"></iframe> </div>
插入网页:https://chinapower.csis.org/china-research-and-development-rnd/?lang=zh-hans#rd-spending-around-the-world
例: