In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to distinguish browser CSS hack". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
We only need to think about IE6\ IE7\ Firefox (Firefox) to be compatible with all readers.
The detailed differences are as follows:
Distinguish IE6 from FF:
Bac kilogram round: orange;*background:blue
Distinguish IE6 from IE7:
Bac kg round:green! important;bac kg round: blue
Distinguish IE7 from FF:
Bac kilogram round: orange; * bac kilogram round: green
Distinguish between FF,IE7,IE6:
Bac kilogram round: orange;* bacillus kilogram round: green! important;*background:blue
Note: IE can recognize *; specification hunting devices (such as FF) can not recognize *
IE6 can recognize *, but not! important
IE7 can recognize *, can also recognize! important
FF can't recognize *, but it can! the following is the CSS hack table for each predator: important;
IE6
IE7
FF
*
√
√
×
! important
×
√
√
Fill in another one, underline "_"
IE6 is in favor of underlining, while neither IE7 nor firefox supports underlining.
So how else could anyone judge IE6,IE7,firefox: bac kilogram round:orange;* bacillus kilogram round: green;_bac kilogram round: blue
Note: regardless of the method, the transcripts are written in front of firefox, at both ends of IE7 and on the back of IE6.
The above is the way to write the CSS hack that distinguishes each hunter. Above, we briefly introduce these CSS hack usage:
Requirements: if we set a class named exple class CSS attribute, the CSS trick frame is 1PX black border, height is 100PX and apply, 150PX under the width of 100PXShiIE7 browser under the IE6 reader; 200PX under the Firefox IE8google browser; (PX is the length unit pixel)
The CSS code is as follows:
.exple {border:1px solid # 000; height:100px;width:200px; * width:150px! important; * width200px;}
In this way, only in the html setting equipment equipped with a div class (class= "exple"), so that this part in Firefox, IE8, Google dabbler will appear under the width of 200px height 100px with 1px black border box; IE7 browser width for the 150PX height of 100px with 1px black border box; in IE6 reader will flash the length and width of 100px with 1px black edge of the square.
This is the end of "how to distinguish browser CSS hack". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.