Sass and Compass making sprite chart

Source: Internet
Author: User

1. Set up a configuration file after Sass and compass are installed

2. Add a Sprite folder to hold the pictures that will be merged, such as the color folder

[email protected] The command Reference. when Compass sees the @import parameter for the instruction *.png , it assumes that all the pictures under this directory are .png made into a sprite.

You can also use certain rules to make it according to the picture and layout you need to generate the corresponding sprite, set the following:

The first box is set to create a large image of all the pictures under the Color folder, and the colleague compiles the corresponding CSS file.

The second box is set to make a larger image of the image under the color folder as needed.

4. When the command is executed, Compass Watch starts to generate a sprite chart

The results are as follows:

Take the corresponding CSS and use it in accordance with your own needs.

On-Line effects:

http://dongxuec3xr.e-horse.cn/

Reference link http://www.w3cplus.com/preprocessor/intermediate/spriting-with-sass-and-compass.html

Sass and Compass making sprite chart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.