Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the css code of webkit core browser

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the webkit core browser css code how to write the relevant knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that everyone after reading this webkit core browser css code how to write the article will have a harvest, let's take a look.

We know that CSS IE Firefox forensics DIV+CSS HACK was used at the meeting. Here's how to distinguish the hack between Google Reader (Chrome), Apple browser (safari) and IE.

Only Google Reader of the core browser of the site kit and CSS hack identified by the safari dabbler

Chrome and safari CSS hack code, only the Google browser Apple dabbler reads the CSS code:

@ media screen and (- webkit-min-device-pixel-ratio:0) {/ * Webkit kernel compatible CSS resolver pattern is put here * /}

Typical:

@ media screen and (- webkit-min-device-pixel-ratio:0) {.yangshi1 {color:#f00} .yangshi2 {border:1px solid # f00;} .yangshi3 {background:#f00;}}

HTML Code:

Css heading 1 CSS5 pattern 2 div+css pattern 3

Total DIV CSS Code:

Google dabbling device is exclusive to safari site kit to distinguish other readers css hack demo @ media screen and (- webkit-min-device-pixel-ratio:0) {.yangshi1 {color:#f00} .yangshi2 {border:1px solid # f00;} .yangshi3 {bac kg round:#f00;}} / * Blood zone code is an experimental style written to Google Reader while it is available * / css fancy 1 CSS5 item 2 div+css Hall 3

I can copy the above broken demonstration code by myself, and increase my memory and application knowledge with my own examples.

Demo function drawing:

Note: the bottom left shows the results of the IE browser, and the top left shows the flash results of Google Reader. It is clear that Chrome supports the exclusive CSS hack code that works.

Conclusion: only the format determiner identified by Google dabble hunter is important. We wrap it with the following code (the new CSS trick determiner is placed in curly braces, how to realize that only Chrome can identify and express it):

@ media screen and (- site kit-min-device-pixel-ratio:0) {/ * the newly built CSS decision maker * /} this is the end of the article on "how to write css code in webkit core browsers". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to write css code in webkit core browser". If you want to learn more, you are 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report