CSS Hack Summary Quick Check

Source: Internet
Author: User

block IE browser (ie not shown)*:lang (en)Select{font:12px!important;} /*FF,OPVisible, special reminder: Due to the recent upgrade of opera, this sentence is only recognized by 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.only IE7 and IE5.0 can be identified*+htmlSelect{... ..}
This hack can be used when faced with the need to style only for IE7 and IE5.0.only IE7 can identify*+htmlSelect{...! important;}
This hack can be used when faced with the need to make a style for IE7 only.IE6 and IE6 following identification* HTMLSelect{... ..}
This place to pay special attention to a lot of blogs are written to be IE6 hack actually ie5.x can also recognize this hack. Other browsers are not recognized.
html/**/>bodySelect{... ..}
This sentence has the same effect as the previous sentence.only IE6 not recognized, shielded IE6Select{Display/* Shielded ie6*/:None;}
The main point here is to separate a property and value from the CSS comment before the colon.only IE6 and IE5 are not recognized, shielded IE6 and IE5Select/**/ {Display/*IE6,IE5 not recognized */: None;}
The difference between this and the above sentence is that there is a CSS comment between the selector and the curly brace.non-shielded IE5.5only IE5 not recognized, shielded IE5Select/*IE5 not recognized */{... ..}
This sentence removes the comment from the attribute area in the previous sentence. Only IE5 is not recognized, IE5.5 can be identified.box Model Solving methodSELCT{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 FloatingSelect: 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.truncation character ellipsisSelect{-o-text-overflow:ellipsis; text-overflow:ellipsis; white-space:nowrap; overflow:hidden;}
This is the more out of the length of the self-cut off the portion of the text, and end with an ellipsis, a very good technology. Only Firefox does not support it at this time.only Opera recognizes@media all and (min-width:0px) {Select {...}}
Make a separate setting for Opera browser.

The above are some of the CSS hack, these are used to solve the local compatibility problem, if you want to separate the compatibility of the content, may wish to try the following several filters. Some of these filters are written in CSS to import special styles through filters, as well as the use of conditions to link or import the required patch styles in HTML.

ie5.x filter, only ie5.x visible @media TTY {
I{content: "\";/* "" */}} @import 'ie5win.css'; /*";}
}/* */IE5/MAC filter, generally need not/*\*//*/
@import "ie5mac.css";
/**/ie if condition hackonlyie
All IE is recognizable
Only IE5.0 can identify
Only IE 5.0+
IE5.0 shifting IE5.5 can be identified
Only IE6 recognizable
Only IE 6/+
IE6 and ie5.x below IE6 are recognizable
Only IE 7/-
Only IE7 recognizable

CSS Hack Summary Quick Check

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.