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

What is the concept of browser private prefix

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

Share

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

Today, I would like to share with you the relevant knowledge of what the concept of browser private prefix is. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article, let's learn about it.

Introduction to browser private prefix

Because many attributes of CSS3 are not yet part of the W3C standard, browsers of each kernel can only recognize CSS3 attributes with their own private prefixes. When we write CSS3 code, we need to prefix the property with the browser's private prefix, and then the browser of this kernel can recognize the corresponding CSS3 attribute.

CSS3 browser private prefix

For example, if we want to use CSS3 to achieve a fillet with a radius of 10px, we might write:

one

Border-radius:10px

But not all browsers recognize the border-radius attribute. For example, chrome browsers can only recognize-webkit-border-radius (prefixed with-webkit-), while firefox browsers can only recognize-moz-border-radius (prefixed with-moz-). Because in order for mainstream browsers to achieve rounded corners, we need to write:

one

two

three

four

five

Border-radius:10px

-webkit-border-radius:10px; / * compatible with chrome and Safari*/

-moz-border-radius:10px; / * compatible with Firefox*/

-ms-border-radius:10px; / * compatible with IE*/

10px; / * compatible with opera*/

These are all the contents of the article "what is the concept of browser Private prefix". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to 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