CSS & HTML5 video switch
来源:互联网 发布:js判断edge浏览器内核 编辑:程序博客网 时间:2024/05/16 06:39
<html lang="zh-CN"><head><meta charset="UTF-8"/><title>BaoGuoChen</title><style type="text/css">body { background:url(""); background-color: white; }#wrap { background-color: gray;width:500px;height:1000px;margin:0 auto; text-align: center;}a:link {color:#FF0000;} /* 未被访问的链接 */a:visited {color:#00FF00;} /* 已被访问的链接 */a:hover {color:#FF00FF;} /* 鼠标指针移动到链接上 */a:active {color:#0000FF;} /* 正在被点击的链接 */#container {width: 600px;margin: 20px auto;text-align: center;}header {margin-bottom: 20px;}h1 {color: #3E4415;font-size: 20px;font-weight: normal; }#images {width: 400px;height: 160px;overflow: hidden;position: relative;margin: 0px auto;}#images video {width: 400px;height: 160px;position: absolute;top: 0;left: -400px;z-index: 1;opacity: 0;transition: all linear 500ms;-o-transition: all linear 500ms;-moz-transition: all linear 500ms;-webkit-transition: all linear 500ms;}#images video:target {left: 0;z-index: 9;opacity: 1;}#images video:first-child {left: 0;opacity: 1;}#slider a {text-decoration: none;background: #E3F1FA;border: 1px solid #C6E4F2;padding: 4px 6px;color: #222;}#slider a:hover {background: #C6E4F2;}</style></head><body><div id="container"><header><h1></h1></header><section><div id="images"><video id="image1" width="320" height="160" controls="controls" autopaly><source src="baoguochen.ogv" type="video/ogg"><source src="baoguochen.mp4" type="video/mp4">Your browser does not support the video tag.</video><video id="image2" width="320" height="160" controls="controls"><source src="2.ogv" type="video/ogg"><source src="2.mp4" type="video/mp4">Your browser does not support the video tag.</video><video id="image3" width="320" height="160" controls="controls"><source src="3.ogv" type="video/ogg"><source src="3.mp4" type="video/mp4">Your browser does not support the video tag.</video></div><div id="slider"><a href="#image1" onclick="click_1()">1</a><a href="#image2" onclick="click_2()">2</a><a href="#image3" onclick="click_3()">3</a></div></section> </div><script type="text/javascript">var myimages = new Array()myimages[0] = "image1"myimages[1] = "image2"myimages[2] = "image3"function pausePlayCurrentVideo(bgc_current_video_id){for (i=0;i<myimages.length;i++){ var myvideo = document.getElementById(myimages[i]); if(myimages[i] == bgc_current_video_id){ myvideo.play(); }else{ myvideo.pause(); }}}function click_1(){pausePlayCurrentVideo("image1");}function click_2(){pausePlayCurrentVideo("image2");}function click_3(){pausePlayCurrentVideo("image3");}</script></body></html>
0 0
- CSS & HTML5 video switch
- Video---HTML5视频video
- HTML5 video
- HTML5 Video
- HTML5 Video
- html5 video
- html5 video
- HTML5 Video
- HTML5<video>
- html5 video
- HTML5 <video>
- html5 video
- HTML5(video)
- 使用jQuery和CSS自定义HTML5 Video 控件 简单适用
- 使用jQuery和CSS自定义HTML5 Video 控件 简单适用
- 使用jQuery和CSS自定义HTML5 Video 控件
- Video---HTML5 Video 实现浅析
- VideoJS - HTML5 Video
- iOS界面-仿网易新闻左侧抽屉式交互
- 将SVG转换为位图的方法(保持浏览器显示的样式)
- DP21 LIS的变种问题-建桥问题 Variations of LIS-Building Bridge @geeksforgeeks
- linux shell 脚本攻略学习13--file命令详解,diff命令详解
- stl string的substr和find_first_of函数的一点心得
- CSS & HTML5 video switch
- Apache Archiva: Maven服务端管理软件
- 给贺老师的一封邮件(问题是如何(HOW)去运用实践,去编程!!,去运用这些计算机科学与技术理论课程)
- 未来三年半,要和姑娘享受亲密吗?
- GIT在Linux上的安装和使用简介
- bootstrap 和传统的html 关于button的属性问题
- DP22 堆盒子问题 Box Stacking Problem @geeksforgeeks
- Java中的null到底是啥?
- FWNX-Evaluate Reverse Polish Notation -c++ VERSION-solution accepted