Skip to content

[css] 第425天 width属性的min-content和max-content有什么作用? #2513

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第425天 width属性的min-content和max-content有什么作用?

3+1官网

我也要出题

Activity

zhaofeipeter

zhaofeipeter commented on Jul 24, 2020

@zhaofeipeter

max-content 在一个父元素上设置该元素后,元素的宽度会以子元素内最长的一个为准,子元素表现得会好像设置了white-space:nowrap一样一行展示

min-content 在一个父元素上设置该元素后,子元素会按照最短断行进行换行

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@zhaofeipeter

        Issue actions

          [css] 第425天 width属性的min-content和max-content有什么作用? · Issue #2513 · haizlin/fe-interview