打开/关闭搜索
搜索
打开/关闭菜单
210
1860
82
6510
失传媒体中文维基
导航
首页
最近更改
随机页面
特殊页面
上传文件
图书馆
所有页面
最近创建
工作中的页面
归档记录
社区
最近评论
通告
讨论区
帮助
指导索引
创建词条
维基语法
编者入门
管理
编辑侧栏
通用CSS
主题CSS
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
登录
查看“︁模版:视频”︁的源代码
来自失传媒体中文维基
更多语言
更多操作
←
模版:视频
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于这些用户组的用户执行:
机器人
、
管理员
您请求的操作仅限属于该用户组的用户执行:
管理员
您可以查看和复制此页面的源代码。
<div class="include-video"> {{#switch: {{#if: {{{BV|}}}|1|}}{{#if: {{{YTID|}}}|2|}} |12 = <!-- 同时有B站和YouTube,显示标签切换 --> <tabber> B站视频= <div class="bilibili-player-link">'''[https://m.bilibili.com/video/{{{BV}}}?t={{{时间|0}}}&p={{{分P|1}}} {{{标题|B站视频}}}] '''</div> <div class="iframe-container"> <htmltag tagname="iframe" class="iframe_video" src="//player.bilibili.com/player.html?bvid={{{BV}}}&p={{{分P|1}}}&autoplay=0&t={{{时间|0}}}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></htmltag> </div> |-| YouTube视频= <div class="bilibili-player-link">'''[https://www.youtube.com/watch?v={{{YTID}}}&t={{{YTStart|0}}}s&list={{{YTPlaylist|}}} {{{YT标题|YouTube视频}}}] '''</div> <div class="iframe-container"> <htmltag tagname="iframe" class="iframe_video" src="//www.youtube-nocookie.com/embed/{{{YTID}}}?start={{{YTStart|0}}}&autoplay=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></htmltag> </div> </tabber> | 1 = <!-- 只有B站视频 --> <div class="bilibili-player-link">'''[https://m.bilibili.com/video/{{{BV}}}?t={{{时间|0}}}&page={{{分P|1}}} {{{标题|B站视频}}}] '''</div> <div class="iframe-container"> <htmltag tagname="iframe" class="iframe_video" src="//player.bilibili.com/player.html?bvid={{{BV}}}&p={{{分P|1}}}&autoplay=0&t={{{时间|0}}}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></htmltag> </div> | 2 = <!-- 只有YouTube视频 --> <div class="bilibili-player-link">'''[https://www.youtube.com/watch?v={{{YTID}}}&t={{{YTStart|0}}}s&list={{{YTPlaylist|}}} {{{标题|YouTube视频}}}] '''</div> <div class="iframe-container"> <htmltag tagname="iframe" class="iframe_video" src="//www.youtube-nocookie.com/embed/{{{YTID}}}?start={{{YTStart|0}}}&autoplay=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></htmltag> </div> | #default = <!-- 无有效参数,提示 --> <div style="color: red; text-align: center;">请填写B站BV号(BV参数)或YouTube视频ID(YTID参数)</div> }} </div> {{#css: .bilibili-player-link { text-align: center; margin: 10px 0; } .bilibili-player-link a { margin:auto auto; text-decoration: none; color: #206090; } .bilibili-player-link a:hover { text-decoration: underline; } .include-video { margin: 0 auto; overflow: hidden; } .iframe-container { max-width: 75%; position: relative; width: 100%; height: 0; padding-bottom: 56.25%; margin: 0 auto; } .iframe-container .iframe_video { position: absolute; width: 100%; height: 100%; left: 0; top: 0; background: black; } @media only screen and (max-width: 767px) { .iframe-container { padding-bottom: 56.25%; } } @media only screen and (min-width: 768px) and (max-width: 991px) { .iframe-container { padding-bottom: 56.25%; } } .tabberneue > ul { text-align: center; margin-bottom: 10px; padding: 5px 0; border-bottom: 1px solid #ddd; list-style: none; padding-left: 0; } .tabberneue > ul > li { display: inline-block; margin: 0 5px; } .tabberneue > ul > li > a { padding: 8px 15px; background: #f5f5f5; border-radius: 4px 4px 0 0; text-decoration: none; color: #333; } .tabberneue > ul > li > a:hover, .tabberneue > ul > li.tabberneue-active > a { background: #206090; color: #fff; } .tabberneue > ul > li.tabberneue-active > a { border-bottom: none; } }} <noinclude> == 使用说明 == 1. 仅嵌入B站视频 <pre style="background: #f9f9f9; padding: 10px; border: 1px solid #ddd; border-radius: 4px;"> <nowiki> {{视频 |BV=视频BV号(必填) |标题=视频标题 |分P=分P数(可选,默认1) |时间=开始秒数(可选,默认0) }} </nowiki> </pre> 2. 仅嵌入YouTube视频 <pre style="background: #f9f9f9; padding: 10px; border: 1px solid #ddd; border-radius: 4px;"> <nowiki> {{视频 |YTID=YouTube视频ID(必填,如https://youtu.be/ABC123 中的 ABC123) |YT标题=视频标题 |YTStart=开始秒数(可选,默认0) }} </nowiki> </pre> 3. 同时嵌入B站+YouTube(自动显示切换标签) <pre style="background: #f9f9f9; padding: 10px; border: 1px solid #ddd; border-radius: 4px;"> <nowiki> {{视频 |BV=B站BV号 |YTID=YouTube视频ID |标题=B站视频标题 |YT标题=Youtube视频标题 |分P=B站分P(可选) |时间=B站开始秒数(可选) |YTStart=YouTube开始秒数(可选) }} </nowiki> </pre> </noinclude>
返回
模版:视频
。
查看“︁模版:视频”︁的源代码
来自失传媒体中文维基