In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Most people do not understand the knowledge points of this article "what is the difference between Quirks mode and Standards mode", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article, "what's the difference between Quirks mode and Standards mode?"
Interview question: what is the Quirks model? What's the difference between it and Standards mode?
The following is an explanation of this problem.
Starting with IE6, the Standards mode is introduced, in which browsers try to properly handle standards-compliant documents to the extent that they are in a given browser.
Before IE6, CSS is not mature enough, so browsers such as IE5 have poor support for CSS, and IE6 will provide better support for CSS. However, the problem arises at this time, because many pages are written based on the old layout, and if IE6 supports CSS, it will make these pages display abnormally, how to ensure that existing pages will not be destroyed and a new rendering mechanism will be provided?
When writing programs, we often encounter the problem of how to ensure that the original interface remains the same and provide more powerful functions, especially when the new functions are not compatible with the old ones. A common practice when faced with this problem is to add parameters and branches, that is, when a parameter is true, we use the new functionality, while if the parameter is not true, dd uses the old functionality, so that it does not destroy the old program and provides new functionality. IE6 is similar to this, it takes DTD as this "parameter", because no one will write DTD on the previous page, so IE6 assumes that if you write DTD, it means that the page will use a better layout that supports CSS, and if not, it will use the previous layout that is compatible with each other. This is the Quirks mode (eccentric mode, weird mode, weird mode).
Difference:
In general, there are three differences in layout, style parsing, and script execution.
Box model: in the W3C standard, if you set the width and height of an element, it refers to the width and height of the content of the element, while in Quirks mode, the width and height of IE also include padding and border.
Set the height and width of inline elements: in Standards mode, setting wdith and height to inline elements such as others will not take effect, but in quirks mode, it will.
Set the height of the percentage: in standards mode, the height of an element is determined by the contents it contains. If the parent element does not set a percentage of the height, the child element sets a percentage of the height is invalid with the margin:0 auto setting horizontal center: use margin:0 auto to center the element horizontally in standards mode, but invalidate in quirks mode.
In fact, it is normal to encounter questions that will not be answered during the interview. If it is proved by investigation that you have a strong learning ability and that you can quickly grasp the questions that you will not encounter through your own ability, the interviewer may also give you this opportunity. But the actual interview process can not entirely pin the hope on the kindness of the interviewer. Having real talent and learning is the invincible truth that you have a foothold in the workplace.
The above is about the content of this article on "what is the difference between Quirks mode and Standards mode". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.