Flash横幅不可用时的替代图像使用HTML / CSS? [英] Alternative image when flash banner is not available USING HTML/CSS?

查看:111
本文介绍了Flash横幅不可用时的替代图像使用HTML / CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个解决我的问题,我有一个网站,我为一个客户端创建了一个闪存头图像,唯一的问题是他访问了网站的草稿在他的iPhone上,被推迟事实上它没有显示任何头像,因为它是一个iPhone(这是我们知道不是闪光的快乐!)。此外,我需要这个反正访问者已关闭或卸载的闪存(当闪光灯不显示时,我已经提供了通常的安装闪光链接)。



有没有办法,我可以做到这一点只使用HTML / CSS或者我将使用JS或类似的东西?



我已经尝试添加标签,但这不做任何事情。 / p>

这是我的代码,如果这有助于任何人)。

  ; div id =container> 
< div id =header>< a href =index.html>< img src =images / logo.jpgwidth =214height =50alt = Tom Frost - Personel Trainer in Leeds,West Yorkshirestyle =border:none;/>< / a>< / div>
< div id =navigation>
< ul id =nav>
< li>< a href =index.htmlid =index>首页< / a>< / li>
< li>< a href =about.htmlid =menu-about>关于< / a>< / li>
< li>< a href =services.htmlid =menu-services>服务< / a>< / li>
< li>< a href =testimonials.htmlid =menu-test>见证< / a>< / li>
< li>< a href =/ blog /id =menu-blog>博客< / a>< / li>
< li>< a href =articles.htmlid =menu-articles>文章< / a>< / li>
< li>< a href =contact.htmlid =menu-contact>联系人< / a>< / li>
< / ul>
< / div>
< div id =title_box>
< embed src =images / flash.swf
quality =high
pluginspage =http://get.adobe.com/flashplayer/
type =application / x-shockwave-flash
width =960height =450
alt =images / header.jpg>
< / embed>< / div>`

显然我的Flash图片



感谢您的提前答复,我看了一下网站,但找不到html的答案。如果js是唯一的方式,一个简单的链接到这个网站上的答案或一个教程如何做到这将是我需要的。



谢谢。

解决方案

如果您使用对象标记而不是 embed ,您可以将备用内容放在标记中。有关跨浏览器标记的信息,请访问 http://www.alistapart.com/articles/flashsatay 。它的要点是:

 < object type =application / x-shockwave-flash
data = images / flash.swf
width =450height =960>
< param name =movievalue =images / flash.swf/>
< img src =images / header.jpg/>
< / object>


i'm looking for a solution to my problem, I have a site I have created for a client which features a flash header image, the only problem is he accessed a draft of the site on his iPhone and was put off by the fact it didn't display any of the head image as it was an iPhone (which as we know are not flash happy!). Also, I would need this anyway incase the visitor has flash turned off or uninstalled (I have provided the usual 'install flash' link when flash isn't displayed).

Is there a way I can do this with just HTML/CSS or will I have to use JS or something similar?

I have tried adding tags but this does nothing.

Here is my code if this helps anyone :).

<div id="container">
<div id="header"><a href="index.html"><img src="images/logo.jpg" width="214" height="50" alt="Tom Frost - Personel Trainer in Leeds, West Yorkshire" style="border:none;"/></a></div>
<div id="navigation">
<ul id="nav">
<li><a href="index.html" id="index">Home</a></li>
<li><a href="about.html" id="menu-about">About</a></li>
<li><a href="services.html" id="menu-services">Services</a></li>
<li><a href="testimonials.html" id="menu-test">Testimonials</a></li>
<li><a href="/blog/" id="menu-blog">Blog</a></li>
<li><a href="articles.html" id="menu-articles">Articles</a></li>
<li><a href="contact.html" id="menu-contact">Contact</a></li>        
</ul>
</div>
<div id="title_box">
<embed src="images/flash.swf" 
quality="high" 
pluginspage="http://get.adobe.com/flashplayer/" 
type="application/x-shockwave-flash" 
width="960" height="450" 
alt="images/header.jpg">
</embed></div>`

Obviously my flash image is in the title_box div.

Thanks for your answers in advance, I had a look around the site but couldn't find a html answer to this. If js is the only way a simple link to the answer on this site or a tutorial on how to do it would be all I need.

Thanks.

解决方案

If you include the flash image using the object tag instead of embed you can put fallback content inside the tags. Some cross browser markup is explained at http://www.alistapart.com/articles/flashsatay. The gist of it is:

<object type="application/x-shockwave-flash" 
        data="images/flash.swf" 
        width="450" height="960">
  <param name="movie" value="images/flash.swf" />
  <img src="images/header.jpg" />
</object>

这篇关于Flash横幅不可用时的替代图像使用HTML / CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆