Is css box-shadow part of element's box model?

后端 未结 2 1012
谎友^
谎友^ 2020-12-11 16:35

Is box-shadow part of box? width of shadow will be included in total width of Block element?

相关标签:
2条回答
  • 2020-12-11 17:02

    According to box-shadow: shadow effect on elements in css3, no.

    box-shadow applies to the outside of the box model unless you specify "inset".

    0 讨论(0)
  • 2020-12-11 17:15

    No, width of shadow is not included in the total width of the element.

    And even if you specify inset, then the shadow will be inside the element, and in no way can contribute to the total width.

    0 讨论(0)
提交回复
热议问题