[Interview Season 3] IE6 compatibility questions, interview ie6 compatibility

Source: Internet
Author: User

[Interview Season 3] IE6 compatibility questions, interview ie6 compatibility

 

I have encountered many basic problems in my recent interview. When I work at ordinary times, I can intuitively see the page problems, and then perform Code debugging. If I do not understand the debugging, I can check it online. However, during the interview, we had to respond to the problem on the spot, and we had to say 1, 2, 3, 4, and 5 systematically... Every time the interview is over, all sorts of annoyance... This is purely deserved. Who told me not to sum it up! When the interview came back, Jack hurt his feet. He stayed in bed for several days. By the way, he summarized all kinds of basic problems and increased his memory!

 

One of the most common front-end problems should be absent... IE6 compatibility issues, although the small cap kids shoes have already abandoned IE6, but I still fall in love with the people of tianchao...

 

One document Declaration: I usually write this article, mainly writing two types: Transition type 2 and html5 Document declaration. If you do not write it, congratulations, you have triggered IE6's weird mode, the box model is changed;

 

Ii. Default style: This is not only for IE6, but may vary with different browsers. Therefore, resetting the default style is basically a default rule;

 

The problem with the trigger: It looks scary. In fact, I don't know why such a name exists. It mainly refers to the double margin PHENOMENON OF ELEMENTS floating in the same direction under IE6, the solution is simple, that is, set the display: inline of the floating element;

 

When a label is added to the image of the img, the border is border. The solution is to set the border to 0;

 

By default, five img images are separated by a certain margin. This is generally caused by a "Press ENTER" during layout. solution 1 is to sacrifice the layout without a carriage return, of course, I usually don't do this, it will make the code too difficult to read and maintain. elder sister is a face filter Controller; second, it will float the img image;

 

There is a gap between block elements and non-floating block elements. The solution is to make the block elements float;

 

7. After the li label is configured with width and height and the sub-elements are floating, there will be gaps between the li labels. solution 1: If there is no width or height, the sub-elements are not floating;

 

Eight IE and FF: cursor: hand (IE); cursor: pointer (FF); both solutions are written;

 

9. IE6 does not support the width and height of Max and Min. The solution uses hack to set _ width and _ height separately. In IE, these two values are automatically adjusted according to the content;

 

10 IE6 does not support PNG24. solution 1 is to use other formats such as PNG8 and Gif, and use filters. For a long time, I will not write it because I cannot remember it, copy and paste each time...

 

Eleven IE6 does not support opacity. The solution is to use the filter: alpha (opacity = num) filter. We recommend that you hand-write it here;

 

12. Minimum height problem: One way to clear floating is to use null labels, but there is a minimum height in IE. Solution: {height: 0px; overflow: hidden; clear: both };

 

The above is basically what I met. I was asked in the previous interview that a pop-up layer under IE6 could not cover the select box. At that time, I got stuck because I did not really know it. I thought about it later, the select box is hidden when it cannot be covered. It is also a solution. Another solution is to use iframe, which is listed here first, try it if you have time.

 

IE hack: _ ie6, + ie7, ie8 \ 0, ie9 \ 9 \ 0

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.