Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fis-spriter-csssprites

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis-spriter-csssprites

基于fis的csssprite,支持repeat-x,repeat-x,background-position

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

##fis-spriter-csssprites 基于FIS的csssprites,通过FIS插件的方式对合并后的css进行csssprites处理。其支持repeat-x, repeat-y, background-position

###安装

$ npm install -g fis-spriter-csssprites

###配置

fis.config.merge({
    namespace: 'demo',
    modules: {
        spriter: 'csssprites'
    },
    pack: {
        'aio.css': [
            '**.css'
        ]
    },
    settings: {
        spriter: {
            csssprites: {
                margin: 10
            }
        }
    }
});

###使用 工具通过图片添加query识别图片是否需要做图片合并,具体

query说明
?__sprite标识图片要做合并

###示例

.header {
    background: url(/img/head_bg.png?__sprite) repeat-x;
}

.nav {
    background: url(/img/nav_bg.png?__sprite) repeat-y;
}

.icon_add {
    background: url(/img/icon/add.jpg?__sprite);
}

.icon_mul {
    background: url(/img/icon/mul.jpg?__sprite) no-repeat;
}

如上,head_bg.png会合并到aio_x.png(aio.css对应图片), nav_bg.png合并到aio_y.png, add.jpgmul.jpg被合并到aio_z.png

Keywords

FAQs

Package last updated on 31 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc