CSS table layout: why does table-row not accept a margin?

后端 未结 10 2348
余生分开走
余生分开走 2020-12-12 23:34



        
10条回答
  •  Happy的楠姐
    2020-12-12 23:52

    See the CSS 2.1 standard, section 17.5.3. When you use display:table-row, the height of the DIV is solely determined by the height of the table-cell elements in it. Thus, margin, padding, and height on those elements have no effect.

    http://www.w3.org/TR/CSS2/tables.html

提交回复
热议问题