Skip to content

[软技能] 第683天 请说说使用iconfont图标的优点和缺点 #3620

Open
@haizhilin2013

Description

@haizhilin2013

第683天 请说说使用iconfont图标的优点和缺点

3+1官网

我也要出题

Activity

sunyun029

sunyun029 commented on Mar 2, 2021

@sunyun029

优点

减少请求次数,将多个 icon 合并到一个字体文件中,从而提高网页性能;
自由的变化大小和颜色,因为字体是可以通过样式来设置大小和颜色的;
矢量图不失真;
适合多平台(浏览器、iOS App、Android App);

缺点

单色
维护成本高

li-shasha

li-shasha commented on Jul 22, 2021

@li-shasha

缺点:
使用个别icon,需要加载整个font库
icon 字体,有时需要调整 line-height 来和内容对齐,比较麻烦。

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@li-shasha@sunyun029

        Issue actions

          [软技能] 第683天 请说说使用iconfont图标的优点和缺点 · Issue #3620 · haizlin/fe-interview