HTML and CSS Reference
In-Depth Information
Your e ! ciently created CSS-based web sites also need to perform as
e ! ciently as possible for your users. Many of the CSS3 techniques we've
covered can reduce file sizes and HTTP requests to increase the speed of
your pages. There are some additional CSS techniques you can use to boost
Writing clean CSS that takes advantage of shorthand properties, grouped
selectors, and other e ! cient syntax is nothing new, but it remains very
important for improving performance. There are also tricks some CSS
developers employ to further reduce CSS file sizes, such as writing each rule
on one line to reduce all the line breaks. Although you can do some of this
manually, there are a number of tools that can optimize and compress your
CSS for you.
CSS Sprites is a CSS technique named by Dave Shea of combining many (or
all) of your site's images into one big master image and then using
background-position to shift the image around to show only a single
image at a time. This greatly improves your pages' performance because it
greatly reduces the number of HTTP requests to your server. This is not a
new technique, but it's becoming increasingly important in modern CSS-
based web sites as page performance becomes more and more important.
Search WWH ::

Custom Search