Http://space.itpub.net/183473/viewspace-473227
CSS compatibility with various browsers is already a common issue, and tutorials on the Internet are everywhere. The following content is not too novel. It is a personal summary and I hope it will be helpful for beginners.
I. CSS hackThe following two methods can solve almost all today's hack.
1 ,! Important
With IE7! Important Support ,! The important method is only for the hack of IE6. (note the writing method. Remember to advance th
CSS compatibility with various browsers is already a common issue, and Web tutorials are everywhere. The following content is not too novel and I hope it will be helpful for beginners.
I. CSS hack
The following two methods can solve almost all today's hack.
1 ,! Important
With IE7! Important Support ,! The important method is only for the hack of IE6. (note the writing method. Remember to advance the declaration position .)
2, IE6/ie77 for Firefox
* + HTML and * HTML are unique tags
It's a cliché that CSS is compatible with every browser, and the tutorials are all over the Web. The following content is not too many novel, purely personal summary, hoping to have some help for beginners.
First, CSS HACK
The following two methods can solve almost all of today's hack.
1,!important
With IE7 support for!important, the!important method is now only for IE6 hack. (Note the wording. Remember that the statement location needs to be advanced.)
2, Ie6/ie77 to Firefox
*+html and
Perhaps you have been complaining about why you should specifically for IE and FF write different CSS, why ie so people headache, and then while writing CSS, while cursing that hateful m$ ie. in fact, for the standard support of CSS, IE is not as hateful as we imagine, the key lies in IE and FF The default value is not the same, mastered this technique, you will find that the compatibility of
Compatible with IE6, IE7, FF min-height minimum Heights in CSS
#mrjin { background: #ccc; min-height:100px; /* Height minimum value set to: 100px*/ height:auto!important;/* compatible FF,IE7 also support!important label */ height:100px;/* Compatible ie6*/ overflow:visible;} Max width ... The main browser IE is not supported for Max-width, the setting of this property is invalid in IE. The
On the CSS for each browser compatibility 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
*+html and
The way of the search for the project in the classification is dynamically generated by JS, each generated elements to dynamically add properties, events. The addition of attributes can be assigned in a way that is applicable to both IE and ff. Like what:
var element = document.createelement (' select ');
Element.id = "Myselect";
The above statement will have the same effect in IE and FF, and it works fi
This article mainly shared the judgment of IE, FF, Opera, Safari, Chrome and other browser and version of the two methods, the need for friends can refer to the followingBecause IE10-IE11 version problem, no longer support document.all judgment, so IE judgment function to re-writefunction Isie () {//ie? if (!! Window. ActiveXObject | | "ActiveXObject" in window) return true; else return false; }First, only the browser is dis
When writing JS, we have to consider the compatibility between IE and FF in many cases. In short, the event in IE is different from the event in ff, and the acquisition method is different. For example, the event in IE is the attribute of the global window object, but not in ff. In many cases, we need to obtain the source object for triggering the event (srceleme
the weekend wants to do a scrolling load picture effect. when validating in Ie,chrome,FF, an interesting question was suddenly discovered. The problem is this:1. I found the mouse scroll once,scroll The handler function for the event does not perform the same number of times. 2. the distance between scrolling is not the same. 3. Click the scroll bar scroll, the number of executions, scrolling distance is not the same. Verified by: number of ex
This article mainly shared the judgment of IE, FF, Opera, Safari, Chrome and other browser and version of the two methods, the need for friends can refer to the followingBecause IE10-IE11 version problem, no longer support document.all judgment, so IE judgment function to re-write?
123456
function isie () { //ie? NBSP;NBSP;NBSP;NBSP;NBSP;NBSP; if (!! Window. ActiveXObject | | "ActiveXObject" in window) NBSP;NBSP;NBSP;NBSP;N
Because the browser companies for their own benefit, so far the browser's HTML standards or JS standards have not been unified. In the common development, we often use the JS framework has basically helped us to deal with JS in each browser differences, but as a developer, there is a need to understand the differences in the browser JS.
FF, Chrome: No window.event objects
FF, Chrome: No Window.event obje
The event in IE and the event in FF is not the same, access is not the same, such as IE in the event is the global Window object properties, and FF did not. There are a lot of times when we want to get the source object that triggers the event (srcelement in IE), here are two ways.
When writing JS, we have to consider the compatibility of IE and FF in many cases.
1. today, I suddenly thought that the time for the jquery benefits is useless. I just practiced it. Who knows, I met the problem of jquery's difference in IE and FF browsers. I don't have to talk about it anymore, let's take a look at the problem.2. Most of those who have used jquery know that the effect of viewing on FF is just the same, but the effect of these just-obtained results is unsatisfactory in IE
$ _ Session why I saved garbled characters in ie, but ff and chrome are normal. I posted a post for help a few days ago, but it was fruitless. (The problem is that ie is not displayed, and ff and chrome are normal) I tried to echo $ _ SESSION [ quot; goodsid quot;] and found that the session in ff is yuan 002 $ _ session. Why are Chinese characters garbled in ie
The search category in the Easy Search project is dynamically generated by JS, and each generated element must dynamically add attributes and events. You can assign values to attributes, which is applicable to IE and ff. For example:
VaR element = Document. createelement ('select ');
Element. ID = "myselect ";
The preceding statement has the same effect in IE and FF and runs normally. However, most of the e
None of them will work. The perfect solution is to execute scripts on IE + ff.
Cause:
Recently, irrigation is often performed in water sources. The most common task in water sources is to receive points.
Occasionally, I am also able to share points (not how to scatter, not how to answer ).
When points were received, they saw that the building was a little uncomfortable (they scored multiple stars ). It is no wonder that there are so many floor pasters
1. today, I suddenly thought that the time for the jquery benefits is useless. I just practiced it. Who knows, I met the problem of jquery's difference in IE and FF browsers. I don't have to talk about it anymore, let's take a look at the problem.
2. Most of those who have used jquery know that the effect of viewing on FF is just the same, but the effect of these just-obtained results is unsatisfactory in I
IE6, 7,8, FFCompatible table
Test code: style code: P {color: # f00;} XHTML code:
IE6
IE7
IE8
FF
Remarks
P {_ color: Red}
√
×
×
×
Dedicated for IE6
* Html p {color: # Red ;}
√
×
×
×
Dedicated for IE6
P {+ color: Red}
√
√
×
×
Dedicated for IE6 and 7
P {* color: Red}
√
√
×
×
Dedicated for IE6 and 7
* Html p {color: red ;}
First attach a document: IE6 IE7 IE8 hack test official documentation: http://msdn.microsoft.com/en-us/library/cc351024 (vs.85). aspx
There have been many ways to make IE6 support transparent PNG on the Internet. However, the problem is that IE7 and IE8 are annoying now, and those methods are not compatible with new browsers (including repeated rendering, such as the original 50% transparency, after repeated rendering, it becomes opaque ......)
To solve this problem, I have installed IE6 IE7 IE
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.