Skip to content

[html] 第693天 picture有哪些优点?picture标签可以替代img标签吗? #3660

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第693天 picture有哪些优点?picture标签可以替代img标签吗?

#1488

3+1官网

我也要出题

Activity

LoveEocding

LoveEocding commented on Mar 9, 2021

@LoveEocding

侧重点不同:img picture 同样都能根据媒体查询响应的改变图片资源。img通过size 媒体查询改变大小 srcset 通过不同大小选择不同的图片 侧重在于改变分辨率。picture 可以定义多个source 根据媒体查询 选择不同的图片 侧重在于 根据不同的屏幕选择不同的图片 内容不同。两个标签都能做到一样的功能 选择在于自己

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

        Issue actions

          [html] 第693天 picture有哪些优点?picture标签可以替代img标签吗? · Issue #3660 · haizlin/fe-interview