In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "what is the difference between border:none; and border:0; in CSS". In daily operation, I believe that many people have doubts about the difference between border:none; and border:0; in CSS. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "what is the difference between border:none; and border:0; in CSS?" Next, please follow the editor to study!
The difference between border:none; and border:0; in CSS
It is believed that this question has been asked by many people on the Internet, and it has been discussed again recently to record my personal understanding. There are two differences between border:none; and border:0; in CSS: one is the difference in performance in theory and the other is the difference in browser compatibility.
1. Performance difference
[border:0;] although the border in CSS is set to "0" pixels cannot be seen on the page, according to the default value of border, the browser still renders border-width/border-color, that is, it has taken up memory value.
[border:none;] set the border in CSS to "none". When the browser parses "none", it will not render, that is, it will not consume memory values.
two。 Compatibility difference
The compatibility difference is only for browsers IE6, IE7 and tags button and input, which occurs under the XP theme of win, win7, and vista.
[border:none;] it seems that an invalid border for IE6/7 still exists when border is "none", as in the following example
[border:0;] when border is "0", it feels more effective than "none". All browsers consistently hide the border.
Summary:
1. The difference between border:0; and border:none; lies in rendering and non-rendering, and the relationship between them and display:none; and visibility:hidden; is similar. For the rendering performance comparison of border attributes, there is no test method, although it is considered that they have rendering performance differences, but it can only be said in theory.
two。 How to make border:none; in CSS fully compatible?
You just need to add a background attribute to the same selector
For border:0; and border:none; individuals prefer to use, border:none;, because border:none; after all in the performance consumption is not controversial, and compatibility can be resolved with the background attribute is not enough to become an obstacle.
At this point, the study on "what is the difference between border:none; and border:0; in CSS" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.