Skip to content

[css] 第720天 rem和px的换算规则是怎样的? #3777

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第720天 rem和px的换算规则是怎样的?

#29

3+1官网

我也要出题

Activity

alanhe421

alanhe421 commented on Apr 4, 2021

@alanhe421

Root font-size

比如root font-size=16px,0.5rem即16*0.5=8px

CafuChino

CafuChino commented on Apr 5, 2021

@CafuChino

rem为相对于根元素字体大小计算倍数,1rem等于一倍html下定义字体大小
em相对父元素字体大小计算

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@alanhe421@CafuChino

        Issue actions

          [css] 第720天 rem和px的换算规则是怎样的? · Issue #3777 · haizlin/fe-interview