This section and you learn about googlechrome Google Browser for the use of CSS hack, CSS hack is because the existing browser to the standard resolution is different, in order to compatible with the browser, the use of a remedy; some people say that CSS hack is a kind of cheating method, For compatibility purposes in a deceptive browser, browser compatibility issues are resolved using browser compatibility differences.
Introduction to CSS Hack
CSS hack because existing browsers are different from standard parsing, a remedy for compatibility with browsers.
CSS hack is a kind of cheating-like means to deceive the browser to achieve compatibility purposes, is to use browser compatibility differences to resolve browser compatibility issues. Therefore, at the beginning of the design, write CSS hack need to follow the following three principles.
CSS hack for googlechrome Google browsers
Google on September 3 launched a browser googlechrome, writing front-end effect of the comrades have a hard work, Ie/ff/opera/safari/googlechrome was not a peaceful world more chaotic.
Fortunately Googlechrome is using the same WebKit engine as safari, we can use a similar way to make CSS hack, written as:
Examplesourcecode
- @mediascreenand (-webkit-min-device-pixel-ratio:0) {
- /* for Googlechrome, Safari3.0, Opera9 CSS style * *
- }
Another kind of CSS hack with the added # is not valid for Chrome, which may be different from the WebKit version. This CSS hack is not valid
Examplesourcecode
- P.callout{color: #FF0000; font-weight:normal;}
- P.callout{color: #000000; font-weight:bold;#}
Attached: The kernel used by various common browsers (Renderingengine)
Examplesourcecode
- Mozillafirefox (Gecko)
- InternetExplorer (Trident)
- Opera (Presto)
- Konqueror (khtml)
- Safari (WebKit)
- Googlechrome (WebKit)
"Edit Recommendation"