1. 插入网站视频
1) Youtube 视频
打开网站视频,点击“分享” - “嵌入”,会给一个嵌入地址,可以设置大小,如:
1
| <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/2HUyHFWAjgM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
单个视频:
1
| {% youtube o7Ojpiwhrec %}
|
{% youtube o7Ojpiwhrec %}
播放列表:
1
| {% youtube PLBTanuC8SLeYgGgRfECgQj3V6sYH61WCt 'playlist' %}
|
{% youtube PLBTanuC8SLeYgGgRfECgQj3V6sYH61WCt ‘playlist’ %}
2) Bilibili 视频,
同youtube方法一,手动加入高宽,但视频质量一般
1
| <iframe width="560" height="315" src="//player.bilibili.com/player.html?aid=821207918&bvid=BV1wG4y1u7y6&cid=990239834&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>
|
2. 插入视频文件
1) 方法一
1
2
| <video id="video" controls="controls" style="max-width: 100%; display: block; margin-left: auto; margin-right: auto;" src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"> video tag
</videos>
|
点击显示视频
video tag
2) 方法二
1
2
3
4
5
6
7
8
9
10
11
| <iframe
src="视频或者网页路径"
scrolling="no"
border="0"
frameborder="no"
framespacing="0"
allowfullscreen="true"
height=300
width=400>
</iframe>
<!-- 相当于是子网页 -->
|
点击显示视频