Skip to content

[css] 第405天 box-sizing的宽度包含了哪些? #2419

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第405天 box-sizing的宽度包含了哪些?

#241

3+1官网

我也要出题

Activity

JsonMox

JsonMox commented on May 26, 2020

@JsonMox

这个得根据box-sizing来计算:

1.box-sizing: content-box;
width = width + 2border + 2padding
2.box-sizing: border-box;
width = width
但是元素内部会被压缩,content = width - 2border - 2padding

simple5960

simple5960 commented on Jul 20, 2021

@simple5960

楼上的说反了吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@simple5960@JsonMox

        Issue actions

          [css] 第405天 box-sizing的宽度包含了哪些? · Issue #2419 · haizlin/fe-interview