Accidentally took a look at someone else's CSS, in the comments, said table element border collapsed (collapsed, overlapping, that word appropriate?) ), different browsers calculate the cell border differently, and then write the link address in the note border Collapse differences in FF and Webkit; for the dead-minded technical man, do not explore the truth, still really sleep.
Angrily open the Web address (every time is very angry, often because of various reasons to open the giant slow), clear the idea, the original general meaning is said: although they deal with different, but the final presentation of the interface is the same. Then I slowly thinking, it seems that Firefox collapse in accordance with the "collapse" of the meaning of processing, webkit is in accordance with the "overlapping (or folding)" means to deal with.
In this way, the English title is very difficult to translate. How do I translate the difference between FF and WebKit when dealing with overlapping borders? Come on, WebKit is presented as overlapping, and if translated into "collapse", Firefox is presented in terms of collapse. Suddenly a phenomenon of software patents: not to protect the mind, only to protect the expression.
The CSS layout of the page is as follows:
{ table-layout: fixed; width: 960px; border-collapse: collapse; border-spacing: 0;} { padding: 2px; Height: 22px; Border: 1px solid Gray;}
Then attach the simple HTML test code:
<Table> <tbody> <TR> <TD>I ' m TD1</TD> <TDID= "TD2">I ' m td2</TD> </TR> </tbody></Table>
Finally use getComputedStyle (td2). borderLeftWidth calculated results are really different, webkit below is 1px,firefox below is 0px, and IE can only use Td2.curretStyle.borderLeftWidth, the result is consistent with WebKit. So, it should be webkit and IE go to the same route, good base friend, must have a leg.
Trivial so much, a picture, instant seconds to understand.
--------------------------------------------
When you are bored, use code to comfort yourself;
Cell border width problem due to table border overlap