NOTES: CSS hack learning and understanding ...

Source: Internet
Author: User

Update Time: 2015.05.12

Compatibility range:

    • Ie:6.0+,firefox:2.0+,opera 10.0+,sarari 3.0+,chrome

Resources:

    • List of common compatible tags for each tour:
√ .bb  {} }   .bb  {}}   TD style= "Text-align:center; margin-left:60px; " > @media Screen and (-webkit-min-device-pixel-ratio:0) { @media all and (min-width:0px) {
Mark IE6 IE7 ie8-10 FF Opera Sarari
[ + > <]  x x x x
_   [*html. class{}]  x x x x X
\9   < Span style= "Background-color: #ccffcc;" >√ x x x
\0   x
x x x x X
< Span style= "color: #ff0000;" >.bb  , X:-moz-any-link, X:default   x < Span style= "Background-color: #ccffcc;" >√ x √ (ff3.5 and below) x X
@-moz-document Url-prefix () {.bb {}}   x x x < Span style= "Background-color: #ccffcc;" >√ x x
x x x < Span style= "Background-color: #ccffcc;" >√
* +html  .BB&NBSP; {}   x x x
Browser Core Trident Trident Trident Gecko Presto Webkit
(Above . BB can be changed to another style name)

Note the point:

    • Many information on the internet often put!important also as a means of hack, in fact, this is a misunderstanding.!important is often used by us to change the style, not to be compatible with hack. -The cause of this misunderstanding is that IE6 in some cases do not actively identify!important, so often misused to identify IE6 hack. But note that IE6 is not recognized in some cases (IE6, the same style attribute is defined in the same curly brace, where one plus important important tag is ignored, for example: {background:red!important; Background:green;} IE6 is interpreted as background color green, and other browsers are interpreted as background color red; If the same style is defined in different curly braces, one of the important will important play a normal role, for example: Div{background:red!important } Div{background:green}, when all browsers are interpreted uniformly as background color red. )
    • It is not recommended for individuals to use hack, as much as possible without the use of hack to achieve the needs of a better user experience.
    • there are roughly 3 forms of CSS Hack,css attribute prefix method , selector prefix method and IE conditional annotation method (i.e. HTML header reference if IE) Hack, CSS in actual project Hack is mostly introduced for differences in performance between different versions of IE browsers.

Read the link:

Http://www.duitang.com/static/csshack.html

http://blog.csdn.net/freshlover/article/details/12132801

NOTES: CSS hack learning and understanding ...

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.