CSS Hack Summary Quick Check

Source: Internet
Author: User
*:lang (ZH) select {font:12px!important;} Special for/*FF */
select:empty {font:12px!important;}/*safari Visible */
Here select is the selector and is replaced as appropriate. The second sentence is unique to the Safari browser on your Mac.

IE7 Identification only
*+html {...}
This hack can be used when faced with the need to make a style for IE7 only.

IE6 and IE6 following identification
* HTML {...}
This place should pay special attention to a lot of landlords have written IE6 hack actually ie5.x can also recognize this hack. Other browsers are not recognized.
html/**/>body Select {...}
This sentence has the same effect as the previous sentence.

Only IE6 not recognized
Select {Display/*IE6 does not recognize */:none;}
The main point here is to separate a property and value from the CSS annotation, which flows in front of the colon.

Only IE6 and IE5 are not recognized
select/**/{display/*IE6,IE5 does not recognize */:none;}
The difference between this and the above sentence is that there is a CSS comment between the selector and the curly brace.

Only IE5 not recognized
SELECT/*IE5 does not recognize */{display:none;}
This sentence removes the comment from the attribute area in the previous sentence. Only IE5 does not recognize

Box Model Solving method
SELCT {width:ie5.x width; voice-family: "\"}\ ""; Voice-family:inherit; Width: correct widths;}
The cleaning method of the box model is not handled by!important. This should be clear.

Clear floating
Select:after {content: "."; display:block; height:0; clear:both; visibility:hidden;}
In Firefox, when the child is floating, then the height of the parent can not completely wrap the entire child, then use this to clear the floating hack to do a definition of the parent, then you can solve the problem.


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.