html object swf,使用swfobject的对象标签HTML5消失(Object tag HTML5 using swfobject disappears)...

使用swfobject的对象标签HTML5消失(Object tag HTML5 using swfobject disappears)

我正在尝试将我的doctype切换到HTML5来玩一些新的东西,但我遇到了flash的问题。

仅当doctype设置为PUBLIC“ - // W3C // DTD HTML 4.0 Transitional // EN”时,以下代码才有效。 当我将它切换为HTML时,它在chrome中工作,在Firefox中根本不起作用,并且在IE9中呈现出一个看起来很糟糕的东西。

width="165"

height="100%"

type="application/x-shockwave-flash"

data="http://www.example.com/movie.swf"

id="leftNavigation"

style="visibility: visible;">

从字面上看,只需切换doctype就可以了。

有任何想法吗???

I am trying to switch my doctype to HTML5 to play around with some of the new stuff, but I am running into an issue with flash.

The following code works ONLY when the doctype is set to PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN". When I switch it to just HTML, it works in chrome, doesn't work at all in Firefox, and renders a small crappy looking thing in IE9.

width="165"

height="100%"

type="application/x-shockwave-flash"

data="http://www.example.com/movie.swf"

id="leftNavigation"

style="visibility: visible;">

Literally just switching the doctype makes it work.

Any ideas???

原文:https://stackoverflow.com/questions/5889625

更新时间:2019-10-09 21:43

最满意答案

所以,昨晚我把头撞到桌子上几个小时后,我终于想到了这个问题。

结果......高度=“100%”将东西搞砸了......拿出来,确保CSS的高度不是100%......

我删除了该属性,一切都很好!

So, I ended up figuring this out late late last night after banging my head on my desk for a few hours.

Turns out....height="100%" screws the thing up...Take that out, and make sure CSS doesn't have height 100% either...

I removed that attribute and all was fine!

相关问答

您无法在html中嵌入AIR应用程序。 AIR适用于桌面应用程序(或移动)。 但是你不需要AIR来使用ByteArray ...... 您找到的代码可能使用File类。 这个只是AIR。 你必须要解决这个问题。 There is no way you can embed an AIR app in a html. AIR is for desktop applications (or mobile). But you do not need AIR to use ByteArray ... The

...

呃,我需要逃离Flash变种才有效。 对于任何有兴趣的人来说,这是我需要改变的 flashvars.theXML = <?php print $test ?>;

对此: flashvars.theXML = escape('<?php print $test ?>');

Ugh, I needed to escape the Flash vars and it worked. For anyone that's interested, this is what I needed to chan

...

要修复flash对象的height ,可以根据页面大小使用图像的height ,这样我们可以: CSS代码:

@media (min-width: 1200px) {

.flash_container {

height: 499px;

}

}

/* Landscape tablets and medium desktops */

@media (min-width: 992px) and (

...

你错过了标签。 You're missing the tags.

这是工作代码: 在每个视频链接上执行SWFObject: $('a.video-link').on('click', function(e) {

e.preventDefault();

// SWFObjects loads a video object into div with ID ytapiplayer.

// If the wrapper div already contains a video we need to remove it first:

if

...

似乎试图提交表格。 一个快速简单的解决方法是按如下方式更改您的onclick: Graficar

并添加一个 return false;

到dibujarCurva()函数的末尾。 如果您想有条件地提交,这很有用。 然而,正如slicetoad和acontell所指出的那样,下面的内容也将解决它,而不对功能进行任何修改。

...

[编辑后] 我只是重新阅读你的问题并查看了pastebin。 您使用的视频网址是一个HTML文件: http : //vidbull.com/embed-iqkhawkkx1rn-640x318.html 。 您无法将HTML文件作为视频加载。 使用适当的视频URL(MP4,F4V,OGG等)再次尝试。 - 根据OP的评论更新 - 问题是您在WordPress标题中对视频URL进行了硬编码。 你需要做的是改用变量。 我建议使用WordPress的“短代码”API ,它将使您能够通过自定义短代码传递

...

是的,有明确的行为; HTML5试图为任何可以在浏览器之间产生差异的情况提供定义的行为,以减少不兼容性,即使在处理无效文档时也是如此。 根据我对规范的阅读,看起来没有src属性或source元素是无效的: 内容模型: 如果元素具有src属性:transparent,但没有媒体元素后代。 如果元素没有src属性:一个或多个源元素,则透明,但没有媒体元素后代。 这似乎向我表明它必须具有src属性或source子元素。 但是Validator.nu和W3C Validator似乎都认为这是一个有效的文档

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值