c (css sprite)

What does css sprites do?

In simple terms, it is a way to combine multiple icons (small icons) into a picture through tools such as ps, so as to reduce the number of http requests and improve the web page loading speed (performance).

The main advantage is to increase the loading speed, and there is a small advantage to reduce the image naming, I believe this is a problem that everyone has.

However, there are some disadvantages, such as the position required to be more precise when making it, and the position adjustment when using it.

How to use: background-image: url (...) to load the image background-repeat: no-repeat; whether to repeat the load, the default is repeat, you can also repeat-x or repeat-y to determine which axis to repeat

Then use background-position: 100px 100px; to achieve positioning

Guess you like

Origin www.cnblogs.com/jzbs/p/12700303.html