This is an article about CSS hack, this article refers to the CSS hack is for class, id the attributes of the hack, the order of arrangement are required. Today to talk to you about class, id do CSS HACK.
Copy Code code as follows:
. test{/*ff*/
height:20px;
Background-color:orange;
}
*+html. test{/*ie7*/
height:20px;
Background-color:blue;
}
*html. test{/*ie6*/
height:20px;
Background-color:black;
}
When using $ (#id). attr (color) to get color, ie and FF are different, here is an example, you can refer to the followingWhen using $ ("#id"). attr ("color") gets the color, IE and FF are different. For a simple example: The code is as follows: Use $ ("#id"). attr ("color") gets the value "green" in the Ff,chrome and the value obtained in IE is "#0080 00 ". So
Turn from:
Http://hi.baidu.com/%B9%F9%E8%B40110/blog/item/130a6d253bdcba0b4c088def.html
Http://www.xnwai.com/?tag=ie%E4%B8%8Eff%E4%B8%ADdiv%E8%87%AA%E5%8A%A8%E6%92%91%E5%A4%A7%E7%9A%84%E9%97%AE%E9%A2%98
Today's typesetting page again encountered this problem, before this can be written: height:auto!important; height:200px; min-height:200px, but today how to die, also do not know how to do, the Internet check, the original to add a Overflow:hidden div, remember to put height:200px, remove, or I
Obtain the div editing box, textarea, and inputtext. The cursor position is compatible with the IE, FF, and Chrome methods. If you have any need, you can refer to the online solution for 2 hours, but it is not compatible with FF, it seems that this kind of thing is not ready for use on the Internet.
Now released, there will be ready-made online for people to use.
In order to save trouble, it is also very c
For the optimal method of clearing floating in IE7, FF, and OP, we discuss a margin problem in the CSS Forest Group and inadvertently find that overflow can also be used to clear floating. Hey hey, this method is not just easy to use, in addition, FF, OP, and IE7 are supported. From then on, we can say goodbye to the FF Floating Method with long compatibility.
T
When you use $ (# id ). the ie and ff are different when attr (color) gets the color. The following is an example. For more information, see $ ("# id "). when attr ("color") gets the color, ie and ff are different. A simple example:
The Code is as follows:
Use $ ("# id "). attr ("color") gets "green" in ff and chrome, and "#008000" in ie ".
Therefore,
When php reads data from the database, ie8 can obtain the data. browsers such as chrome, 360, and ff cannot obtain the data. This post was last edited by vic90 at 16:55:13 on.
Browser php mysqlThis is my php code. I want to get the content of the z_register data table, which can be obtained through IE browser, but cannot be obtained through chrome, 360, FF, or other browsers.
When chrome, 360,
In the recent MD page, we need to consider ff and IE, so a lot of JS will have some problems.It is best to use W3C standard L for coding.
You can also:
This is an event executed after the IE and FF pages are loaded.
Innertext does not have this attribute in ff. The corresponding attribute is textcontent.The following is to determine whether it is IE
If (naviga
The best way isWord-wrap: break-word; overflow: hidden;InsteadWord-wrap: break-word; word-break: break-all;NeitherWord-wrap: break-word; overflow: auto;
There is no problem in IE. In FF, long strings of English will be overwritten.
Differences between word-wrap and word-break
Word-wrap:Normal Default. Content exceeds the boundaries of its container.Break-word Content wraps to next line, and a word-break occurs when necessary. If necessary, the word-br
In IE, there are onmouseenter and onmouseleave.
Unfortunately, FF does not. I want to explain again, why does FF not reference such a good function?
There is also onpropertychange in IE, ah, FF, none...
A js section is introduced in the comparison example to be compatible with FF's onmouseenter and onmouseleave .:CopyCodeThe Code is as follows: var XB ={Evtha
)http://www.CodeHighlighter.com/-->Function Format (what, OPT){Editor. Focus ();Editor.document.exe ccommand (what, false, OPT );}
Recognize selected text and manipulate dom
There are several differences between FF and IE. One is press enter, and the other is
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Editor.doc ument. onkeypress = fnkeypress;
Function fnkeypress (){
If (document. All ){
VaR EV =
How does FF change to full screen? (Not the F11 style)-Linux general technology-Linux technology and application information. The following is a detailed description. I don't know what the key is or what it is, FF suddenly becomes full screen, but unlike pressing F11 full screen (I press F11 here and the window is full screen and only the tab bar is retained ), it only hides the outer border of the window (
Because FF's default font is, and the default browser settings ignore the font definition in CSS. Therefore, if you do not specify the font of the FF in CSS, the styles of the two browsers will definitely be different [the premise is that you have not changed the default settings of the FF browser, so that it can be defined with the CSS font].
Other summary:
1. P labels in IE and
Event is an object that comes with ie, but ff does not have this object. You can only simulate the event by passing parameters. The following briefly introduces that event is an object that comes with ie, this object does not exist in ff. You can only simulate the event by passing parameters.
In addition, srcElement is used in ie to obtain the event trigger source, and target is used in
Window.event
IE: There are window.event objects
FF: No Window.event object. You can pass an event object to a parameter of a function. such as Onmousemove=domousemove (event)
Mouse Current coordinates
Ie:event.x and Event.y.
FF:event.pageX and Event.pagey.
General: Both have Event.clientx and Event.clienty attributes.
The current coordinates of the mouse (plus the distance the scroll bar rolls over)
IE:event.offsetX and Event.offsety.
FF:event.layerX
is set; Margin-left:auto; ”What needs to be explained is that if you want to use this method to make the entire page centered, it is recommended not to be nested in a div, you can split out a number of Div, as long as in each split div defined margin-right:auto; Margin-left:auto; It's OK.3 box models differ explained.
The code is as follows
Copy Code
#box {width:600px;For ie6.0-width:500px;For ff+ie6.0}#box {Width:600px!i
Web pages about CSS compatibility with each browser has been a cliché, the network of tutorials everywhere. The following content is not too novel, purely personal summary, I hope to have some help for beginners.
First, CSS HACK
The following two methods can solve almost all hack today.
1,!important
With the support of IE7 to!important, the!important method is now targeted only at IE6 hack. (Note the wording. Remember that the claim position needs to be advanced.)
2, Ie6/ie77 to Firefox
*
When you use $ ("# id"). attr ("color") to obtain the color, ie and ff are different. A simple example:Copy codeThe Code is as follows: Use $ ("# id "). attr ("color") gets "green" in ff and chrome, and "#008000" in ie ".Therefore, if you use attr ("color") to determine the current color, you need to determine the color name and corresponding color code considering the compatibility. For example:Copy codeTh
In the CSS forest to discuss a margin problem inadvertently found overflow can also be used to clear floating, hey, this method is not only easy to use, and FF, OP, IE7 all support, from now on can say goodbye to the long compatibility and poor FF clear floating method.
The method is really simple, just add the overflow attribute to the label that needs to be cleared.
CSS Code
Copy the Code code as foll
FF Browser
. test{
height:20px;
Background-color:orange;
}
IE7 Browser
*+html. test{/*ie7*/
height:20px;
Background-color:blue;
}
IE6 Browser
*html. test{/*ie6*/
height:20px;
Background-color:black;
}
You can see that FF is the most obedient browser through the CSS code above. In IE6 and IE7 if you want to use hack you must precede the tag HTML with the husband level.
Here is very good memory, IE6 plu
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.