In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you a sample analysis of CSS Hack compatible code, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Frequent use of CSS HACK titles and dotting codes-DIV+CSS net support
1. Fencing IE hunting device (also equal to not revealing performance under IE)
*: lang (zh) select {font:12px! important;} / * Special use of FF * /
Select:empty {font:12px! important;} / * safari visible * /
Where select is the determiner, change according to the situation. The second sentence is unique to safari browsers on MAC.
2. Only IE7 recognizes hack
* + html {… }
This HACK can be adopted when it is important to do tricks only for IE7.
3. Identify CSS HACK below IE6 and IE6
* html {… }
Pay special attention to this place. Many landowners have written the HACK of IE6 and can recognize this HACK as well as IE5.x. The other hunting instruments are not recognized.
Html/**/ > body select {. }
This sentence is contrary to the influence of the previous sentence.
4. Only IE6 does not recognize div hack
Select {display / * IE6 does not recognize * /: none;}
Here, the first thing is to gobble up an attribute and value at the end of the CSS interpretation, and interpret it before the colon.
5. Only IE6 identifies and approves
.yangshi {_ height:20px;}
Here IE6 supports the "_" short underscore before identifying the CSS attribute.
6. Only IE6 and IE5 are not recognized.
Select/**/ {display / * IE6,IE5 does not recognize * /: none;}
The difference between this and the following sentence is the addition of a CSS text between the choice character and the curly braces.
7. Only IE5 does not recognize
Select/*IE5 does not recognize * / {display:none;}
This sentence removes the expression of the attribute area from the previous sentence. As long as the IE5 does not recognize
8. Box model planning method
Selct {width:IE5.x width; voice-family: "\"}\ ""; voice-family:inherit; width: coarse width;}
The elimination of the box model is not through! important to deal with the punishment. You should be familiar with this.
9. Clear the float
Select:after {content: "."; display:block; height:0; clear:both; visibility:hidden;}
In Firefox, when the children are floating, then the height of the parent can not completely cover the whole child, so at this time to use this floating HACK to define the parent, then we can covet the title problem.
10. Truncation ellipsis
Select {- oMut _ text _ over _ flow _ rides; text-overflow:ellipsis; white-space:nowrap; overflow:hidden;}
This is a good technical means to truncate the extra part of the text after exceeding the length and end with an ellipsis. It's just that Firefox doesn't approve at the moment.
11. Only need Opera to identify
@ media all and (min-width: 0px) {select {. }}
Do odd settings for Opera browsers.
The above is all the content of the article "sample Analysis of CSS Hack compatible Code". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.