微件:BiliVideo:修订间差异
来自植物大战僵尸杂交版Wiki
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
<includeonly> | <includeonly> | ||
<style> | <style> | ||
. | /* 电脑端:固定尺寸 */ | ||
.video-container { | |||
width: <!--{$width|default:720}-->px; | |||
height: | height: <!--{$height|default:360}-->px; | ||
max-width: 100%; /* 关键:手机端自动缩小 */ | |||
max-width: 100%; | |||
} | } | ||
. | |||
.video-container iframe { | |||
width: 100%; | width: 100%; | ||
height: 100%; | height: 100%; | ||
border: 0; | border: 0; | ||
} | } | ||
</style> | </style> | ||
<div class=" | <div class="video-container"> | ||
<iframe src="//player.bilibili.com/player.html?bvid=<!--{$bv|escape:'html'}-->&page=<!--{$page|default:1}--> | <iframe src="//player.bilibili.com/player.html?bvid=<!--{$bv|escape:'html'}-->&page=<!--{$page|default:1}-->" | ||
scrolling="no" | scrolling="no" | ||
frameborder="no" | frameborder="no" | ||
| 第33行: | 第28行: | ||
== 使用说明 == | == 使用说明 == | ||
=== 参数 === | === 参数 === | ||
* '''bv''' | * '''bv''':B站视频的BV号(必填) | ||
* '''page''' | * '''width''':电脑端宽度(可选,默认720) | ||
* '''height''':电脑端高度(可选,默认360) | |||
* '''page''':分P序号(可选,默认1) | |||
=== 调用示例 === | === 调用示例 === | ||
<pre> | <pre> | ||
{{#widget:BiliVideo|bv=BV1RhZjBEEYj}} | {{#widget:BiliVideo|bv=BV1RhZjBEEYj|width=800|height=450}} | ||
</pre> | </pre> | ||
=== 效果预览 === | === 效果预览 === | ||
{{#widget:BiliVideo|bv=BV1RhZjBEEYj}} | {{#widget:BiliVideo|bv=BV1RhZjBEEYj|width=720|height=360}} | ||
</noinclude> | </noinclude> | ||
2026年6月5日 (五) 23:58的版本
使用说明
参数
- bv:B站视频的BV号(必填)
- width:电脑端宽度(可选,默认720)
- height:电脑端高度(可选,默认360)
- page:分P序号(可选,默认1)
调用示例
{{#widget:BiliVideo|bv=BV1RhZjBEEYj|width=800|height=450}}
效果预览