HTML初步学习10
2015-10-03 10:30
666 查看
今天学习多媒体的编写
首先是飘动文字,主要由以下属性:飘动方向、速度、范围、次数、方式、留白区(vspace hspace)
首先是飘动文字,主要由以下属性:飘动方向、速度、范围、次数、方式、留白区(vspace hspace)
1 if(navigator.userAgent.indexOf("Chrome") > -1){ 2 3 如果是Chrome: 4 5 <audio src="" type="audio/mp3" autoplay=”autoplay” hidden="true"></audio> 6 7 }else if(navigator.userAgent.indexOf("Firefox")!=-1){ 8 9 如果是Firefox: 10 11 <embed src="" type="audio/mp3" hidden="true" loop="false" mastersound></embed> 12 13 }else if(navigator.appName.indexOf("Microsoft Internet Explorer")!=-1 && document.all){ 14 15 如果是IE(6,7,8): 16 17 <object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"><param name="AutoStart" value="1" /><param name="Src" value="" /></object> 18 19 }else if(navigator.appName.indexOf("Opera")!=-1){ 20 21 如果是Oprea: 22 23 <embed src="" type="audio/mpeg" loop="false"></embed> 24 25 }else{ 26 27 <embed src="" type="audio/mp3" hidden="true" loop="false" mastersound></embed> 28 29 } 30 31 或 32 33 代码如下: 34 35 var ua = navigator.userAgent.toLowerCase(); 36 37 if(ua.match(/msie ([\d.]+)/)){ 38 39 jQuery('#__alert_sound').html('<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"><param name="AutoStart" value="1" /><param name="Src" value="/sounds/alert/1.mp3" /></object>'); 40 41 } 42 43 else if(ua.match(/firefox\/([\d.]+)/)){ 44 45 jQuery('#__alert_sound').html('<embed src="/sounds/alert/1.mp3" type="audio/mp3" hidden="true" loop="false" mastersound></embed>'); 46 47 } 48 49 else if(ua.match(/chrome\/([\d.]+)/)){ 50 51 jQuery('#__alert_sound').html('<audio src="/sounds/alert/1.mp3" type="audio/mp3" autoplay=”autoplay” hidden="true"></audio>'); 52 53 } 54 55 else if(ua.match(/opera.([\d.]+)/)){ 56 57 jQuery('#__alert_sound').html('<embed src="/sounds/alert/1.mp3" hidden="true" loop="false"><noembed><bgsounds src="/sounds/alert/1.mp3"></noembed>'); 58 59 } 60 61 else if(ua.match(/version\/([\d.]+).*safari/)){ 62 63 jQuery('#__alert_sound').html('<audio src="/sounds/alert/1.mp3" type="audio/mp3" autoplay=”autoplay” hidden="true"></audio>'); 64 65 } 66 67 else { 68 69 jQuery('#__alert_sound').html('<embed src="/sounds/alert/1.mp3" type="audio/mp3" hidden="true" loop="false" mastersound></embed>'); 70 71 } 72
相关文章推荐
- HTML中隐藏掉select的下拉箭头
- HTML DOM insertBefore() 方法 使用的时候发现一个问题,记录下
- 插入音乐.HTML
- 图片摆置.HTML
- HTML标签----图文详解(二)
- HTML初步学习9
- html页面显示div源代码:用<xmp></xmp>标签
- HTML学习记录<三> :创建电子邮件链接
- HTML学习记录<二>:标签的 target 属性中的_blank _self _parent _top
- 让HTML页面元素居中的各种实现方法
- HTML常用标签
- html 标签知识
- HTML初步学习8
- 单行、多行 注释.HTML
- Html辅助方法(分页、下拉框)
- HTML学习记录<一>:<abbr>及<acronym>
- html,body{height:100%}
- c#写的一个html模板方案,不知道大家在asp.net上面使用的是不是也是这个原理
- 获取HTML标签当前在网页中的绝对位置
- html教程-1-概述扯淡