To write cross-browser CSS, you must know the two modes in which browsers parse CSS: strict mode and quirks mode.
The so-called standard mode means that the browser parses and executes the code according to W3C standards; the weird mode uses the browser's own way to parse and execute the code. Because different browsers parse and execute in different ways, we call it It's a weird mode. Whether the browser uses standard mode or weird mode when parsing is directly related to the DTD declaration in your web page. The DTD declaration defines the type of standard document (standard mode parsing) document type, which will cause the browser to load the web page and display it in the corresponding way. , ignoring the DTD declaration will cause the web page to enter quirks mode.
What are the statements? Which statement is better? We recommend that you use the strictest mode of XHTML 1.0. We should strictly demand ourselves from the beginning. The specific statement is as follows:
If you take over a legacy web page that does not initially have a DTD declaration and uses many tags that have been abolished in XHTML, then we recommend that you use XHTML compatibility mode, as declared below :