收藏
回答

自定义组件不能添加字体图标

自定义组件不能添加字体图标,如果添加了会报错, 因为自定义组件只能有类选择器不能有@font-face 选择器 如:




@font-face {

    font-family: 'iconfont';

    src: url('./iconfont.ttf') format('truetype');

    font-weight: normal;

    font-style: normal;

    line-height: 1;

 }


这样会报:   VM4758:2 Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.(./pages/iconfont/iconfont.wxss:3:1)This wxss file is ignored. 的错



回答关注问题邀请回答
收藏

3 个回答

  • LastLeaf
    LastLeaf
    2017-11-23

    支持了的。

    2017-11-23
    有用
    回复
  • LastLeaf
    LastLeaf
    2017-11-03

    感谢反馈,我们会考虑之后追加 @font-face 支持。

    2017-11-03
    有用
    回复
  • 菜
    2017-11-23

    现在是不是支持了?我在ios测试版可以用

    2017-11-23
    有用
    回复
登录 后发表内容