Flash的Fallback Content等
来源:陈成的博客 发布时间:2010-04-01 12:18:00
看youa的源码发现的,原来flash可以有fallback content:
<object type="application/x-shockwave-flash" data="...ny2010.swf" width="300" height="100" > <param name="movie" value="...ny2010.swf" wmode="transparent"> <param name="menu" value="false"> <param name="wmode" value="transparent"> <a href="..." target="_blank"><img src=".../ny2010.png" alt="..." width="300" height="100"></a></object>
测试了Safari 4, Firefox 3, IE6/7/8禁用Flash插件的访问,均无兼容问题。
但是却有另外两个问题,都是IE下的:
Flash文件会被请求两次;
Flash要等全部下载好才播放;(尚未仔细验证)
==
所以最终采各家(见文末rel)所长后用了这种写法:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="68"> <param name="movie" value=".../T1isRtXlNEXXXXXXXX.swf"> <param name="wmode" value="transparent"> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data=".../T1isRtXlNEXXXXXXXX.swf" width="300" height="68"> <param name="wmode" value="transparent"> <!-- for firefox --> <!--<![endif]--> <a href="http://www.taobao.com/" target="_top" style="height:43px;margin-left:56px;"> 淘宝网 <img width="167" height="110" src=" alt="淘宝网" title="Taobao.com - 阿里巴巴旗下网站"> </a> <!--[if !IE]>--> </object> <!--<![endif]--></object>
==
在HTML5 Spec中找到下面两段相关文字:
Some embedded content elements can have: content that is to be used when the external resource cannot be used (e.g. because it is of an unsupported format). The element definitions state what the fallback is, if any.
Due to the algorithm above, the contents of
elements act as fallback content, used only when referenced resources can't be shown (e.g. because it returned a 404 error). This allows multiple
elements to be nested inside each other, targeting multiple user agents with different capabilities, with the user agent picking the first one it supports.
但测试证明,没有浏览器在swf文件404时启用fallback content。
==
另外使用时要注意的一点:在浏览器支持flash的情况下(99%+?),除IE家族外,其他浏览器均会发起对替换图片的请求。
猜你喜欢
- 如下所示:select a1,a2,a1+a2 a,a1*a2 b,a1*1.0/a2 c from bb_sb把a表的a1,a2列相加作为
- 本文实例为大家分享了python实现自动抢火车票,供大家参考,具体内容如下splinter使用首先介绍一下splinter使用:plinte
- 使用python生成随机图片验证码,需要使用pillow模块1.安装pillow模块pip install pillow2.pillow模块
- 安装paramiko后,看下面例子:import paramiko#设置ssh连接的远程主机地址和端口t=paramiko.Transpor
- python最值与下标最大值的下标winner = np.argmax(scores)多个最大值的下标(np.argwhere返回数组中非0
- 有些时候我们需要得到刚刚插入数据库中的条目id,用于相关系统的更改,在以前我是使用select+top 1+desc 这种笨方法实现的,在没
- <div> <table width="320" cellpadding="0"
- 前言最近参加了大创项目,题目涉及到计算机视觉,学姐发了个修正图像的博客链接,于是打算用这个题目入门OpenCV。分析问题照片中的PPT区域总
- 一、浪漫玫瑰花实现代码:from turtle import *import timesetup(1000,800,0,0)speed(0)
- 连接Access数据库string connStr = @"Data Source=D:\database.mdb; Provid
- 记录应用程序的操作日志可以使用数据库、文本文件、XML文件等。我这里介绍的是使用 XML 文件记录操作日志。我觉得使用 XML 记录操作日志
- 本文实例为大家分享了python实现五子棋游戏的具体代码,供大家参考,具体内容如下checkerboard.pyfrom collectio
- 内容摘要: 当用户填写页面<FORM>内容时所提供的全部值,或在浏览器地址栏输入在URL后的值,通过Form和QueryStrin
- bootstrap里面有个激活按钮的时候,按钮变成不可用的;按照官网里面的方法介绍是在button按钮加个 data-loading-tex
- 对Python字符串,除了比较老旧的%,以及用来替换掉%的format,及在python 3.6中加入的f这三种格式化方法以外,还有可以使用
- Pyinstaller库简介:简单来说,就是直接将python语言编写的py程序打包为exe可执行文件,对方不需要安装python环境即可直
- vscode简介什么是vscode简单来说,vscode是一款文本编辑器,而不是ide。这就是说,vscode只提供编辑的环境而不提供编译的
- Memoization 是一种将函数返回值缓存起来的方法,在 Lisp, Ruby, Perl, Python 等语言中使用非常广泛。随着
- 1、python 操作xml的方式介绍查看全部包含“三种⽅法:⼀是xml.dom. * 模块,它是W3CDOMAPI的实
- 除了第一年外,谷歌每年母亲节都会更换主页的logo以向全世界的母亲致敬。虽然2000年和2001年母亲节的logo图片看起来没什么不同,但是