Socket
Socket
Sign inDemoInstall

images2css

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    images2css

generate css from the existing sprite images


Version published
Maintainers
1
Install size
29.8 kB
Created

Readme

Source

images2css

generate css from the existing sprite images

使用

var kalok = images2css({
    folderPath: ""
    imageRelativePath: "../",
    backgroundSize: true
});

fs.writeFile(path.join(process.cwd(), "kalok.css"), kalok);

参数说明:

folderPath

String 类型,需要遍历的图片目录,只遍历一层目录,不会遍历深层子目录,默认值: process.cwd()

imageRelativePath

String 类型,background-image 的 url 相对路径,默认值: "./"

backgroundSize

Boolean 类型,CSS 中是否需要带上 background-size 属性,默认值: false

联系我

willerce(willerce@gmail.com)

FAQs

Last updated on 05 Feb 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc