-webkit-和-moz-border-radius对表不起作用? [重复]

时间:2022-11-14 09:21:52

This question already has an answer here:

这个问题在这里已有答案:

This works

这很有效

div {
  -moz-border-radius: 5px 5px 0 0;
  border:1px solid #000;
  margin:30px;
}

This does not work

这不起作用

table {
  -moz-border-radius: 5px 5px 0 0;
  border:1px solid #000;
  margin:30px;
}

Does anyone know how to use -moz and -webkit to work on tables?

有谁知道如何使用-moz和-webkit来处理表?

1 个解决方案

#1


8  

5.6. Effect on Tables

5.6。对表的影响

The ‘border-radius’ properties do apply to ‘table’ and ‘inline-table’ elements. When ‘border-collapse’ is ‘collapse’, the UA may apply the border-radius properties to ‘table’ and ‘inline-table’ elements, but is not required to. In this case not only must the border radii of adjacent corners not intersect, but the horizontal and vertical radii of a single corner may not extend past the boundaries of the cell at that corner (i.e. the cell's other corners must not be affected by this corner's border-radius). If the computed values of the border radii would cause this effect, then the used values of all the border radii of the table must be reduced by the same factor so that the radii neither intersect nor extend past the boundaries of their respective corner cells.

'border-radius'属性适用于'table'和'inline-table'元素。当'border-collapse'为'collapse'时,UA可以将border-radius属性应用于'table'和'inline-table'元素,但不是必需的。在这种情况下,不仅相邻角的边界半径不必相交,而且单个角的水平和垂直半径可能不会延伸超过该角的单元边界(即,单元的其他角不得受此角的影响边界半径)。如果边界半径的计算值将导致该效果,则表格的所有边界半径的使用值必须减小相同的因子,使得半径既不相交也不延伸超过其各自角单元的边界。

The effect of border-radius on internal table elements is undefined in CSS3 Backgrounds and Borders, but may be defined in a future specification. CSS3 UAs should ignore border-radius properties applied to internal table elements when ‘border-collapse’ is ‘collapse’.

border-radius对内部表元素的影响在CSS3背景和边框中未定义,但可以在将来的规范中定义。当'border-collapse'为'collapse'时,CSS3 UAs应忽略应用于内部表元素的border-radius属性。

#1


8  

5.6. Effect on Tables

5.6。对表的影响

The ‘border-radius’ properties do apply to ‘table’ and ‘inline-table’ elements. When ‘border-collapse’ is ‘collapse’, the UA may apply the border-radius properties to ‘table’ and ‘inline-table’ elements, but is not required to. In this case not only must the border radii of adjacent corners not intersect, but the horizontal and vertical radii of a single corner may not extend past the boundaries of the cell at that corner (i.e. the cell's other corners must not be affected by this corner's border-radius). If the computed values of the border radii would cause this effect, then the used values of all the border radii of the table must be reduced by the same factor so that the radii neither intersect nor extend past the boundaries of their respective corner cells.

'border-radius'属性适用于'table'和'inline-table'元素。当'border-collapse'为'collapse'时,UA可以将border-radius属性应用于'table'和'inline-table'元素,但不是必需的。在这种情况下,不仅相邻角的边界半径不必相交,而且单个角的水平和垂直半径可能不会延伸超过该角的单元边界(即,单元的其他角不得受此角的影响边界半径)。如果边界半径的计算值将导致该效果,则表格的所有边界半径的使用值必须减小相同的因子,使得半径既不相交也不延伸超过其各自角单元的边界。

The effect of border-radius on internal table elements is undefined in CSS3 Backgrounds and Borders, but may be defined in a future specification. CSS3 UAs should ignore border-radius properties applied to internal table elements when ‘border-collapse’ is ‘collapse’.

border-radius对内部表元素的影响在CSS3背景和边框中未定义,但可以在将来的规范中定义。当'border-collapse'为'collapse'时,CSS3 UAs应忽略应用于内部表元素的border-radius属性。