[HTML] Google IE-x.js 解决IEx与W3C标准的冲突

如果分别用IE5、IE6、IE7浏览同一个网页,将可能出现不一样的效果。
这是它们之间对CSS的解析选择器不一样或错误和个别bug所导致。为了解决这些错误和bug。
我们不得不找到一个能平衡于它们之间的解决方法。
如png透明问题在IE5、IE6下无法显示出其效果,我们可能会使用CSS hack或者引入外部JavaScript来实现。譬如前面我提到过用pngfix的那个方法就是调用外部JavaScript来解决在IE5、IE6下png透明问题。当然还有更多的方法。
而现在有种更加完美的方法能兼容IE5、IE6、IE7的CSS选择器解析不一样问题。那就是: ie7 – js
ie7 – js中是一个JavaScript库(解决IE与W3C标准的冲突的JS库),使微软的Internet Explorer的行为像一个Web标准兼容的浏览器,支持更多的W3C标准,支持CSS2、CSS3选择器。它修复了许多的HTML和CSS问题,并使得透明PNG在IE5、IE6下正确显示。
目前该ie7 – js版本: 2.0 beta 3
用法:
直接引用Google Code服务器上的js文件。
 
<!--[if lt IE 7]>
<script src=http://up.2cto.com/2013/0222/20130222021950559.png";</script>
<![endif]-->
<!--[if lt IE 8]>
<script src=http://up.2cto.com/2013/0222/20130222021951759.png";</script>
<![endif]-->
<!--[if lt IE 9]>
<script src=http://up.2cto.com/2013/0222/20130222021951794.png";</script>
<![endif]—>

IE7.js
使IE5、IE6升级至兼容IE7
注释使Internet Explorer版本号低于IE7的IE浏览器载入该代码。
<!–[if lt IE 7]>
<script src=”http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js” type=”text/javascript”></script>
<![endif]–>
 
IE8.js
使IE5、IE6、IE7支持更多的W3C标准(修复了许多的HTML和CSS问题)。
注释使Internet Explorer版本号小于8的IE浏览器载入该代码,而其它符合标准的浏览器则会忽略该代码,并在IE8出来后不干扰其工作。
<!–[if lt IE 8]>
<script src=”http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js” type=”text/javascript”></script>
<![endif]–>
 
让png透明的语句.
<script src="IE8.js">IE7_PNG_SUFFIX=".png";</script>
 
E7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6.
Status
Current version: 2.1 beta4.
Usage
IE7.js
Upgrade MSIE5.5-6 to be compatible with MSIE7.
<!--[if lt IE 7]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE7.js"></script>
<![endif]-->
IE8.js
Upgrade MSIE5.5-7 to be compatible with MSIE8.
<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
<![endif]-->
You do not need to include IE7.js if you are using IE8.js
IE9.js
Upgrade MSIE5.5-8 to be compatible with modern browsers.
<!--[if lt IE 9]>www.2cto.com
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
You do not need to include IE7/IE8.js if you are using IE9.js
PNG
The script only fixes images named: *-trans.png
If you want the fix to apply to all PNG images then set a global variable as follows:
var IE7_PNG_SUFFIX = ".png";
You must set this variable before including the IE7.js script. Alternatively, you can set the variable inside the IE7.js script element:
<script src="IE8.js">IE7_PNG_SUFFIX=".png";</script>
The suffix will ignore query string parameters. For more fine-grained control you can also set IE7_PNG_SUFFIX to a RegExp object. If you want to use an alternative PNG solution then set the suffix to something that cannot possibly match:
var IE7_PNG_SUFFIX = ":";
By default, the PNG will be stretched (this simulates tiling). If you want to turn this off then set the no-repeat property as follows:
div.example {
  background: url(my-trans.png) no-repeat;
}
Unfortunately, the transparent background image cannot be tiled (repeated) using background-repeat. Nor can it be positioned using background-position.

[HTML] Google IE-x.js 解决IEx与W3C标准的冲突

时间: 2024-08-13 11:34:36

[HTML] Google IE-x.js 解决IEx与W3C标准的冲突的相关文章

google无法访问 2014解决方法详解

方法二 寻找可用IP地址 IP地址一:http://74.125.205.147/ 即可访问谷歌 转:http://www.newasp.net/tech/89292.html 以是我个人实测的:配合 Chrome 浏览器.GoaAgent v3.1.8.SwitchySharp.crx.SwitchyOptions.bak 就可以访问google 而且搜索打开的页面很快. google无法访问 2014解决方法详解,布布扣,bubuko.com

google打不开解决办法

show和set命令是两条用于维护SQLPlus系统变量的命令 : SQL> show all --查看所有系统变量值 SQL>show user --显示当前连接用户 SQL>show error --显示错误(编译function,procedure,package,pl/sql的时候,可以查看具体的错误提示) SQL>set sqlprompt SQL  --设置默认提示符,默认值就是SQL SQL>set linesize 1000 --设置屏幕显示行宽,默认100

Google Chrome 调试JS简单教程[更新]

题外话,刚开始我写这篇内容只是将自己了解的一些知识放上来,不巧的是我分析了我的来访日志,很多朋友都有这个需求,为了大家没有白来,我决定充实下这篇文章.最近更新时间2014-02-14 chrome版本: 32.0.1700.107 m 我是一名忠实Chrome迷,使用它已经快有2年的历史了,整体给我的感觉就是清爽,快速,简洁.又打小广告了……^_^,虽然我知道IE8+也有调试工具,包括火狐的什么XXBUG,但是我用过之后,个人还是十分偏爱chrome的debug. chrome对于在前端打拼的兄

去掉iframe默认滚动条后影响正常滚动以及js解决高度自适应。

对于iframe,相信大家都是知道存在很多弊端,比如说不利于搜索引擎的抓取:产生冗余结构体系不易管理等.不过在漫长的开发路上有时候使用是不可避免的. 前两天在做一个退弹的功能的时候使用了iframe,由于我设置的滚动条属性是:scrolling="auto",首先出现的问题是右侧有两个滚动条,不难想到一个是父级页面的,另一个就是iframe自带的.好在iframe去掉自身滚动条还比较方便,设置了scrolling="no"后就消失了,我以为问题就解决了,然而,我发现

Google用不了解决方法(增加gmail用不了的方法)

1. 获取google最新的ip列表 可以使用工具1: http://ip.chinaz.com/?IP=www.google.com 也可以使用工具2: http://tool.17mon.cn/ping.php 输入 www.google.com 查询. 这里能查询到大量的,方便你尝试不同的ip来使用google. 2. 直接在url里输入通过1楼获得的ip,一般就可以打开google了 http://91.213.30.151  如果不能搜索,请下面方法设置 hosts 3. 怎么使用gm

【css】jquery.pngFix.js解决透明问题

/** * -------------------------------------------------------------------- * jQuery-Plugin "pngFix" * Version: 1.2, 09.03.2009 * by Andreas Eberhard, [email protected] * http://jquery.andreaseberhard.de/ * * Copyright (c) 2007 Andreas Eberhard *

JavaScript必备:Google发布的JS代码规范(转)

[翻译]关于Google发布的JS代码规范,你需要了解什么? 翻译 | WhiteYin 译文 | https://github.com/WhiteYin/translation/issues/10 Google为了那些还不熟悉代码规范的人发布了一个JS代码规范.其中列出了编写简洁易懂的代码所应该做的最佳实践. 代码规范并不是一种编写正确JavaScript代码的规则,而是为了保持源代码编写模式一致的一种选择.对于JavaScript语言尤其如此,因为它灵活并且约束较少,允许开发者使用许多不同的

Invalid JDK version in profile &#39;doclint-java8-disable&#39;: Unbounded range: [1.8, for project com.google.code.gson:gson 解决办法

利用maven打包的时候遇到这个问题 在git上发现一个解决方案 问题解决 Invalid JDK version in profile 'doclint-java8-disable': Unbounded range: [1.8, for project com.google.code.gson:gson 解决办法 原文地址:https://www.cnblogs.com/macwhirr/p/10314661.html

用JS解决多行溢出文本的省略问题

前言 在项目开发过程中,经常会遇到溢出文本的省略问题.根据需求,可以把文本省略分为单行文本省略和多行文本省略两类. 单行文本的省略,现在css样式 text-overflow 已经有兼容性很好的样式支持了.但是多行文本,目前支持webkit内核的css样式 -webkit-line-clamp 可以做到,但它针对火狐浏览器就行不通了.这就是本文要解决的问题. css解决方案(可跳过) 如果上网搜索[多行文本省略],除了上文提到的css样式控制,找到的答案都是做固定位置的遮盖,而且能发现的是,目前