English 中文(简体)
部队浏览器无视超文本5的特征
原标题:Force browser to ignore HTML 5 features
  • 时间:2012-01-16 01:11:40
  •  标签:
  • html
  • firefox

我有一个遗产网站,在FF 3.6、IE 7至8等文件中正确无误,但在FF 9中失败。

问题是,网站使用的旧的(超前5级)第三方联合材料框架(Woodstock)增加了HIDDEN对一些超文本元素的归属感,因此,在我看望燃烧弹中的超文本时,我想到的是:

<table id="foo" hidden="">

这些网页有:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

This worked fine on browsers designed for HTML 4 which did not have a HIDDEN attribute. But the latest browsers that support HTML 5 interpret this attribute and hide elements that I need to be visible.

很难修改(未支持的)第三方框架,以避免使用<编码>HIDDEN属性。

是否可强迫浏览器将页数作为超文本4,而不对超文本5的特征作任何解释? 其他建议

最佳回答

除电子计算机外,其他浏览器仅使用一种超文本(除立式外)。

However all the hidden attribute does is trigger some style rules in the UA stylesheet. You can add your own style rules to just override those. How complicated those rules need to be depends on what elements the framework adds the elements to, but one comprehensive approach would be to copy the various display rules from the HTML5 spec or from http://mxr.mozilla.org/mozilla-central/source/layout/style/html.css with the exception of the ones involving hidden and just put them in a stylesheet that your page links to.

问题回答

是的,你应宣布正确的数字。 如果是真的超文本4,你应宣布为超文本4,而不是X射线。

See http://www.w3.org/QA/2002/04/valid-dtd-list.html for the different types you can use.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签