box-sizing - 'outline' 是在 'border-box' 或 'content-box' 中计算的?
box-sizing - 'outline' is calculated in 'border-box' OR 'content-box'?
计算框的宽高时,轮廓宽度如
outline: 5px dashed red;
如果box-sizing:border-box
,是否会在框的width/height中考虑轮廓?
我在 W3Schools 上找到了关于它的注释 HERE
它说:"Outline differs from borders! Unlike border, the outline is drawn outside the element's border, and may overlap other content. Also, the outline is NOT a part of the element's dimensions; the element's total width and height is not affected by the width of the outline."
当您设置大纲时,它不应受到 box-sizing
设置的影响,并且大纲将在框外。
轮廓 属性 独立于框大小,不作为元素宽度或高度的一部分。我通常习惯从人群中脱颖而出。
计算框的宽高时,轮廓宽度如
outline: 5px dashed red;
如果box-sizing:border-box
,是否会在框的width/height中考虑轮廓?
我在 W3Schools 上找到了关于它的注释 HERE
它说:"Outline differs from borders! Unlike border, the outline is drawn outside the element's border, and may overlap other content. Also, the outline is NOT a part of the element's dimensions; the element's total width and height is not affected by the width of the outline."
当您设置大纲时,它不应受到 box-sizing
设置的影响,并且大纲将在框外。
轮廓 属性 独立于框大小,不作为元素宽度或高度的一部分。我通常习惯从人群中脱颖而出。