在asp.net中播放视频 [英] Adding marquee on a playing video in asp.net
本文介绍了在asp.net中播放视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须开发一个简单的应用程序,我必须在播放视频时添加一个字幕标签。
喜欢这个请帮助我如何处理和什么样的我需要的工具是asp.net
喜欢这个:
点击图片
解决方案
<%@ Page 语言 = vb AutoEventWireup = false CodeBehind = VideoMarquee.aspx.vb 继承 = MyTestProject.VideoMarquee %>
< !DOCTYPE < span class =code-attribute> html PUBLIC - // W3C // DTD XHTML 1.0 Transitional // EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio nal.dtd >
< html xmlns = http://www.w3.org/1999/xhtml >
< head runat = server >
< title > < / title >
< style type = text / css >
。容器 { position : relative; }
。容器 视频
{
< span class =code-attribute> position : relative;
< span class =code-attribute> z-index : 0;
}
。 overlay
{
color :跨度> <跨度class =code-keyword>#fff;
position : < span class =code-keyword>绝对;
top : < span class =code-keyword> 0;
left : < span class =code-keyword> 0;
z-index : 1;
width : 640px;
}
< / style >
< / head >
< 正文 >
< 表格 id = form1 runat = server >
< div >
< div < span class =code-attribute> class = 容器 >
< ; video id < span class =code-keyword> = video width = 640 height = 480 onclick = play(); controls >
< source src = video / Motion.mp4 type = video / mp4 < span class =code-keyword> / >
< / video >
< div class = overlay >
< p > 视频上方的内容< span class =code-keyword>< / p>
< marquee > 用于模拟选框标记的随机文字... < / marquee >
< / div >
< / div >
< / div >
< / form >
< / body >
< / html > ; 跨度>
I have to develop a simple application in which I have to add a marquee tag on playing video.
Like this please help me how to approach and what kind of tools I need is asp.net
Like This:
Click for image
解决方案
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="VideoMarquee.aspx.vb" Inherits="MyTestProject.VideoMarquee" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> <style type="text/css"> .container { position:relative; } .container video { position:relative; z-index:0; } .overlay { color:#fff; position:absolute; top:0; left:0; z-index:1; width:640px; } </style> </head> <body> <form id="form1" runat="server"> <div> <div class="container"> <video id="video" width="640" height="480" onclick="play();" controls> <source src="video/Motion.mp4" type="video/mp4" /> </video> <div class="overlay"> <p>Content above your video</p> <marquee>Random text to simulate a marquee tag ...</marquee> </div> </div> </div> </form> </body> </html>
这篇关于在asp.net中播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文