微件:BiliVideo:修订间差异
来自植物大战僵尸杂交版Wiki
更多操作
创建页面,内容为“<includeonly> <div class="bilibili-video"> <iframe src="//player.bilibili.com/player.html?bvid=<!--{$bv|escape:'html'}-->&page=<!--{$page|default:1}-->" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" width="<!--{$width|default:720}-->" height="<!--{$height|default:360}-->"> </iframe> </div> </includeonly> <noinclude> == 使用说明 == === 参数 === * '''bv'''…” |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
<includeonly> | <includeonly> | ||
<div class=" | <style> | ||
<iframe src="//player.bilibili.com/player.html?bvid=<!--{$bv|escape:'html'}-->&page=<!--{$page|default:1}-->" | .resp-video { | ||
position: relative; | |||
padding-bottom: 56.25%; /* 16:9 宽高比,B站视频标准比例 */ | |||
height: 0; | |||
overflow: hidden; | |||
max-width: 100%; | |||
margin: 1em 0; | |||
} | |||
.resp-video iframe { | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
height: 100%; | |||
max-width: 100%; | |||
border: 0; | |||
} | |||
</style> | |||
<div class="resp-video"> | |||
<iframe src="//player.bilibili.com/player.html?bvid=<!--{$bv|escape:'html'}-->&page=<!--{$page|default:1}-->&high_quality=1&autoplay=0" | |||
scrolling="no" | scrolling="no" | ||
frameborder="no" | frameborder="no" | ||
framespacing="0" | framespacing="0" | ||
allowfullscreen="true | allowfullscreen="true"> | ||
</iframe> | </iframe> | ||
</div> | </div> | ||
| 第18行: | 第35行: | ||
* '''bv''':B站视频的BV号(必填,如 BV1RhZjBEEYj) | * '''bv''':B站视频的BV号(必填,如 BV1RhZjBEEYj) | ||
* '''page''':视频分P序号(可选,默认 1) | * '''page''':视频分P序号(可选,默认 1) | ||
=== 调用示例 === | === 调用示例 === | ||
<pre> | <pre> | ||
{{#widget:BiliVideo|bv=BV1RhZjBEEYj | {{#widget:BiliVideo|bv=BV1RhZjBEEYj}} | ||
</pre> | </pre> | ||
=== 效果预览 === | === 效果预览 === | ||
{{#widget:BiliVideo|bv=BV1RhZjBEEYj | {{#widget:BiliVideo|bv=BV1RhZjBEEYj}} | ||
</noinclude> | </noinclude> | ||
2026年6月5日 (五) 23:53的版本
使用说明
参数
- bv:B站视频的BV号(必填,如 BV1RhZjBEEYj)
- page:视频分P序号(可选,默认 1)
调用示例
{{#widget:BiliVideo|bv=BV1RhZjBEEYj}}
效果预览