this problem in the network that has a lot of people asked, again he gets a recent discussion, to take records of my personal understanding, border:none; and border: 0; reflects the difference between two things: First, a theoreticalSecond, the performance difference is the browser compatibility differences.

performance difference:

【border: 0;】 the border set to" 0" pixels Although invisible on the page, but the default values by border understanding, the browser is still on the border -width/border-color rendering carried out, that had been occupied by the memory value.

【border: none;】 the border set to" none" that is, no, the browser parsing" none" will not make exaggerated movements,it will not consume memory value.

compatibility differences:

differ only for the browser compatibility IE6, IE7 and the tag button, input is concerned, in the win, win7, vista theme for XP will show signs of such a situation.

【border: none;】 When the border is" none" when you seem to IE6/7 is invalid border still exists, the following cases Demo1:

【border:0;】 When the border is" 0" , the feeling more than" none" is more effective, all browsers are unanimous in the border hidden in the following cases Demo2:

sum :

contrast border: 0; and border: none; difference is there between the exaggerated and did not play up, feel them and display: none; and visibility: hidden; the relationship is similar to the border property for the time being they did not find rendering performance comparison testing methods, although we think that they exaggerated the performance differences exist, but can only say that in theory.

how to make border: none; to achieve full compatibility?Only need to add in the same context attribute selectors can be in the following cases Demo3:

For the border: 0; and border: none; personally to the use, border: none;, because the border: none;, after all, consume no dispute in terms of performance, but alsobackground properties can be used to solve the compatibility not be an obstacle.

text: http://blog.gulu77.com/?p=614


This chapterreleased:Design and Material (http://www.q60.org),Reprinted Please note Ming.