Fully compatible with the CSS HACK wording IE6/IE7/IE8/FF

Browser market chaos caused great trouble to designers, design pages compatible browsers have to complete this compatible with the browser, would have ie6 compatible with ff is easily among the solutions. Would be trouble spots with a ie7, ie8 even the appearance of headache, and not the original hack ie7 method can be used, how should we do?

The first method:

Fortunately, Microsoft provides such a code:

<meta http-equiv="x-ua-compatible" content="ie=7" />
<head> Put this code inside the page inside the ie8 ie7 resolution up Jiugen exactly the same, so basically you can ignore the ie8, rest of the code only needs to write on it

background: # ffc; / * effective against firefox * /
* Background: # ccc; / * on ie7 valid * /
_background: # 000; / * valid only for ie6 * /
Explain it:

firefox can parse the first paragraph, the latter two because preceded by a special symbol "*" and "_", firefox can not recognize, it only recognized background: # ffc, see is yellow;

ie7 can identify the first two short, to the last subject, so the final analysis is the background: # ccc, see is gray;

ie6 three sections can be identified, and "_" the only ie6 will recognize, the final resolution is _background: # 000, see is black

Amen! Already is the simplest and best understood of the wording, if you are coming in google, I can responsibly tell you that this method is ok, I've tested.

ie8 compatibility of that period of 7 I tested the code, and in my present windos 7 brought the ie8 beta no problem, since the official version of ie8 also control whether to use them do not know.

ps: If you find written by me, or have questions, please check your html head, take a look at the contents of <head> is not the case prior to the standard formulation

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

This is now a fairly standard formulation, if the page you are using dreamweaver to do so, the default is of such norms, remember, this non-standard writing style, and compatibility can not guarantee

The second method:

Demanding friend is reluctant to increase the head of the page <meta http-equiv="x-ua-compatible" content="ie=7" /> such a code, because this result is that each page had to increase . To these so-compatible browsers really need to find another solution. Site released a day earlier "perfect compatible with ie6, ie7, ie8 and firefox's css transparent filters", may then test the negligence, IE8 does not solve the compatibility, a lot of friends responded that not take. Out some time today, A lot of information, finally solved the problem.

The following are compatible IE6/IE7/IE8/FF wording, note the following order can not be reversed

margin-bottom: 40px; / * ff attributes * /
margin-bottom: 140px \ 9; / * IE6/7/8 attributes * /
color: red \ 0; / * IE8 support * /
* Margin-bottom: 450px; / * IE6 / 7 of the properties * /
Following the form of an instance, we can run the code check effects

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>2010 The latest fully compatible with ie6, ie7, ie8, FF  CSS HACK Writing  --www.ietester.net</title>
<style type="text/css">
#abc {
 border:2px solid #00f;     /*ff Property  */
 border:2px solid #090\9;   /* IE6/7/8 Property   */
 border:2px solid #F90\0;     /* IE8 Support   */
 _border:2px solid #f00;     /*IE6 Property  */
 /* Upper and lower order cannot write wrong  */
    <li>FF Under the blue side  </li>
    <li>IE6 Under the Red edge  </li>
    <li>IE7 Under the Green edge  </li>
    <li>IE8 Under the yellow edge  </li>
    <li> Please mark to reprint  www.ietester.net</li>
分类:Web 时间:2010-04-11 人气:570
blog comments powered by Disqus


  • CSS control the image geometric scaling (IE, GOOGLE browser, FIREFOX test) 2011-01-07

    CSS control the image geometric scaling (IE, GOOGLE browser, FIREFOX test) img { width: expression (this.width / this.height> 126/96? 126: (this.width * 96/this.height)); height: expression (this.width / this.height> 126/96? (this.width * 126/this.h

  • 也说说Google与Firefox 2014-02-05

    小众跟和菜头"干"上了,:) 详细情况大家可以看这里.这里还有这里.本来是不大不小的一件事,个人感觉小众与和菜头都太激动,再加上一群 Google 与 Firefox 的 Fans 的加入,就变得热闹了.不过这样的 Blogging 氛围也好,玩嘛. 不过凭借个人对小众的了解,之所以会旗帜鲜明的支持 Google 对在中国大陆 Firefox 推介的价格调整,在很大程度并不是和菜头所说的对那帮流氓推广的人影响了自己的收入而表示的愤怒,而是作为一个 Firefox 支持者,免费优秀软件的

  • javascript支持firefox,ie7页面布局拖拽效果代码 2014-09-18

    javascript 拖拽 页面拖拽 拖拽效果的页面 超级拖拽 javascript支持firefox,ie7页面布局拖拽效果代码 鼠标拖拽 javascript 拖拽JavaScript Google IG Drag Demo,非常棒的拖动,准备用于F2Blog新Theme的后台模块设置,之间的拖 动 拖拽效果的页面效果演示地址:http://img.jb51.net/online/tuozhuai/google_drag.htm 加强版效果演示地址:http://img.jb51.net/o

  • DOCTYPE html PUBLIC js code so that part of the solution failure 2010-11-02

    Javascript call to a number of properties in the name of which has changed how I said the value of not document.body.scrollTop js script after taking time to document the value in question is estimated to get out of here ~ ~ Obviously the script usin

  • Firefox下的浏览器兼容性检测工具--Compatibility Detector 2014-03-10

    这里给大家推荐一个Firefox下的浏览器兼容性检测工具--Compatibility Detector.这个工具对于新手来说是非常不错的一个东东,下面我就简单说下它的优点. 作为一个前端开发者来说,最痛苦的事情之一就是要兼容现在各种五花八门的浏览器,而在实际的调试中这个调试过程又是让人劳心劳力.而Compatibility Detector能把目前很多已知的兼容性问题很easy的展现在我们面前.Compatibility Detector下有两种:基本检测和高级检测. 基本检测会检测一些基本的

  • 对三大浏览器firefox,IE7,maxthon试用分析 2015-03-12

    firefox,IE7,maxthon在国内不能不说是用户最多有三大浏览器,不过各占比例不是太了解!对这三大浏览器,每一种我都试用过!今天对三大浏览器作一简单分析,当然前提是我对三大浏览器没有任何偏见,因为我是IE6的钟情者! 首先,从功能上讲, IE7做为微软为VISTA量身定做的浏览器,我个人试用后最不看好的一款,当然我只能一个普通网民的角度看,功能并不是很突出,而且除了介面上变的更加简单外和好看些外,没有什么创新,一个对网页进行检测的创新功能,我试用后觉得并没有多大用处!而且IE7简化之后

  • Google Maps API Discussion 2010-04-29

    The following code can just replace the key string test using <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"&g

  • HTML5地理定位结合Google Map显示当前位置 2012-07-23

    使用HTML5+Google Map获取到当前位置,并在Google地图上显示出来 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="

  • java IE Add to Favorites Firefox IE7 compatible browser status bar error, "Element not found" or "do not have permission" 2010-03-08

    java IE Firefox compatible add favorite Java code : function addToBookmark() { var url = document.location.href; if(window.sidebar){ window.sidebar.addPanel("MonsterBig", url,""); }else if(document.all){ window.external.addFavorite(url

  • Google Maps API site to embed Google Maps API 2010-05-14

    Thanks: http://67566894.javaeye.com/ Google's Maps API is perfect, is not complicated to use them. I realized through JavaScript, a simple Google Maps, and with a map marker. If your site domain name instead of localhost, you need to apply online dom

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 闽ICP备15018612号

processed in 0.034 (s). 13 q(s)