GithubHelp home page GithubHelp logo

生成2X图的时候,如果左上角的第一个图标是方的而且有背景色 ,那这个图片左上角4*4px的图案被掏空 about css-spritesmith HOT 3 CLOSED

laoshu133 avatar laoshu133 commented on September 26, 2024
生成2X图的时候,如果左上角的第一个图标是方的而且有背景色 ,那这个图片左上角4*4px的图案被掏空

from css-spritesmith.

Comments (3)

laoshu133 avatar laoshu133 commented on September 26, 2024

PLACE_IMAGE 是用来占位以保证 2x 图片宽高刚好是 1x 的两倍,
layout 不支持指定宽高来实现布局,这里使用了一个黑魔法让它按我们给定的宽高来布局;
两个占位的图片是透明的,正常来讲是不会影响生成的图片,你这个问题可能是渲染引擎的问题,方便给出你的配置和环境吗?

from css-spritesmith.

ZhaoxinLiu avatar ZhaoxinLiu commented on September 26, 2024

return gulp.src(config.app.iconCSS)
.pipe($.concat('sprite.css'))
.pipe(gulp.dest('app/css/icon/'))
.pipe($.cssSpritesmith({
imagepath: './app/images/icons/',
spritedest: 'app/images/icons/',
spritepath: '../../images/',
useimageset: true,
newsprite: false,
spritestamp: false,
cssstamp: false
})).pipe(gulp.dest('./'));

图片在这里 http://i4.piimg.com/511860/753c300b58dc182e.png
系统Mac os 10.11.5
node 5.11.1

windows 也如此

from css-spritesmith.

laoshu133 avatar laoshu133 commented on September 26, 2024

依赖库 spritesmith 的问题,具体原因未查明;
先临时发布一个版本 [email protected]
未更新 grunt-css-spritegulp-css-spritesmith 依赖,如有需要明天可以发一版

207a267

from css-spritesmith.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.