Giter VIP home page Giter VIP logo

autosprite's Introduction

Autosprite

CSS Sprite generator for ASP.NET websites bundle style

This project uses an existing one, that I converted into a Class Library: http://spritegenerator.codeplex.com/
The CSS/Sprite generation is fully done by this project, I just wired it up into the ASP.NET application lifecycle

The way you can use this utility to select which files you want to create the sprite for, is: AutoSprite.SpriteConfig.AddImage("~/Content/*.jpg");

The generated files are autosprite.css and autosprite.png

Sample CSS:
.sprite { background-image: url('autosprite.png'); background-color: transparent; background-repeat: no-repeat; } .google-windows-8 { width: 620px; height: 332px; background-position: 0px -398px; } .download { width: 276px; height: 183px; background-position: 0px -159px; } .vista { width: 211px; height: 239px; background-position: -276px -159px; } .image { width: 316px; height: 159px; background-position: 0px 0px; }

sprite class is the "base" class. the rest are one class per image file included in the sprite, what you use is both

for instance.

You can see real usage on the TestApplication project

autosprite's People

Contributors

ricmrodrigues avatar

Watchers

 avatar  avatar

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.