很多企业客户在企业网站建设中都加入了网站视频功能,当然视频的展示形式也有很多种,那么怎么样建立视频呢,北京高端网站建设小编为您分享一种建立网站视频的分享:
<!--视频中心-->
<style type="text/css">
.div1{border:1px solid #DEDEDE; border-radius:7px;cursor:pointer; float:right; width:280px; padding:5px 10px;width:280px;height:150px; height:240px;}
.div1 p{ margin: 8px 0px;
text-align: left;
cursor: pointer;
width: 240px;
position: relative;
top: -40px;
z-index: 99;
left: 22px; }
.divv{ display:none; border:0px solid red; width:30%; position:fixed; z-index:999; left:30%; /*height:400px;*/ top:100px; background-color:#FFFFFF;}
.xdiv{z-index:9999;top:9px; border:1px solid #DEDEDE; font:bold 14px/20px; border-radius:50%; margin:5px; width:20px; height:20px; float:right; position:absolute;right:0px;text-align: center;}
</style>
<script language="javascript">
$(function(){
var audio = document.getElementById("mp4"); //获得对象
$(".mp4").click(function(){
$(".divv").show(300);
audio.play();//播放
});
$(".xdiv").click(function(){
$(".divv").hide(300);
audio.pause();//播放
});
})
</script>
<div class="div1" >
<img src="images/dsd.png" width="100%" class="mp4">
<p>
工程机械案例解决方案
<a href="yingyong.html"><img src="images/more_03.jpg" align="right"></a>
</p>
</div>
<!--结束视频-->
</div>
<div class="divv">
<div class="xdiv">X</div>
<video width="100%" height="380px" controls autobuffer>
<source src="media/cat.mp4" style="width:100%; height:100%" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'></source>
</video>
<script type="text/javascript">
flowplayer("player", "flowplayer-3.2.7.swf");
flowplayer(
"player2",
"flowplayer-3.2.7.swf",{
clip: {
url: "flowplayer.flv",
autoPlay: false,
autoBuffering: true
}
}
);
</script>
</div>