问答详情
源自:7-3 compass-utilities-3

生成一个指定选择器时,创建一个子选择器?

@import "compass/utilities/sprites";

@import "logo/*.png";

.test {
    @include logo-sprites(icon-01);
}


生成的文件


/* line 64, logo/*.png */
.logo-sprite, .test .logo-icon-01 {
  background-image: url('/Images/logo-s0130b10ba6.png');
  background-repeat: no-repeat;
}

/* line 84, C:/Ruby22/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets/compass/utilities/sprites/_base.scss */
.test .logo-icon-01 {
  background-position: 0 0;
}

提问者:芒果布丁 2016-02-17 14:47

个回答

  • 纯白茉莉
    2016-05-04 16:25:09

    代码没写全啊。