One advantage of using CSS3 is that you can apply colors and backgrounds to any element in a web document, create your own gradients, and even apply multiple backgrounds to the same element. This practical guide shows you many ways to use colors, backgrounds, and gradients to achieve some pretty awesome effects.
Short and sweet, this book is an excerpt from the upcoming fourth edition of CSS: The Definitive Guide. When you purchase either the print or the ebook edition of Colors, Backgrounds, and Gradients, you’ll receive a discount on the entire Definitive Guide once it’s released. Why wait? Learn how to bring life to your web pages now.
Define foreground colors for a border or element with the color property
Combine foreground and background colors to create interesting effects
Position and repeat one or more images in an element’s background
Fix an image to a screen’s viewing area, rather than to the element that contains it
Use color stops to define vertical, horizontal, and diagonal linear gradients
Create spotlight effects, circular shadows, and other effects with radial gradients
Eric A. Meyer is the author of the critically acclaimed online tutorial Introduction to HTML, as well as some other semi-popular Web pages. He is a member of the CSS&FP Working Group and the author of Cascading Style Sheets: The Definitive Guide.
The animals on the cover of Colors, Backgrounds, and Gradients are salmon (salmonidae), which is a family of fish consisting of many different species. Two of the most common salmon are the Pacific salmon and the Atlantic salmon.
Pacific salmon live in the northern Pacific Ocean off the coasts of North America and Asia. There are five subspecies of Pacific salmon, with an average weight of 10 to 30 pounds. Pacific salmon are born in the fall in freshwater stream gravel beds, where they incubate through the winter and emerge as inch-long fish. They live for a year or two in streams or lakes and then head downstream to the ocean. There they live for a few years, before heading back upstream to their exact place of birth to spawn and then die.
Atlantic salmon live in the northern Atlantic Ocean off the coasts of North America and Europe. There are many subspecies of Atlantic salmon, including the trout and the char. Their average weight is 10 to 20 pounds. The Atlantic salmon family has a life cycle similar to that of its Pacific cousins, and also travels from freshwater gravel beds to the sea. A major difference between the two, however, is that the Atlantic salmon does not die after spawning; it can return to the ocean and then return to the stream to spawn again, usually two or three times.
Salmon, in general, are graceful, silver-colored fish with spots on their backs and fins. Their diet consists of plankton, insect larvae, shrimp, and smaller fish. Their unusually keen sense of smell is thought to help them navigate from the ocean back to the exact spot of their birth, upstream past many obstacles. Some species of salmon remain landlocked, living their entire lives in freshwater.
Salmon are an important part of the ecosystem, as their decaying bodies provide fertilizer for streambeds. Their numbers have been dwindling over the years, however. Factors in the declining salmon population include habitat destruction, fishing, dams that block spawning paths, acid rain, droughts, floods, and pollution.
The cover image is a 19th-century engraving from the Dover Pictorial Archive. The cover fonts are URW Typewriter and Guardian Sans. The text font is Adobe Minion Pro; the heading font is Adobe Myriad Condensed; and the code font is Dalton Maag’s Ubuntu Mono.
Comments about oreilly Colors, Backgrounds, and Gradients:
The book would be better suited for someone with more experience,,,the background info for CSS actually didn't work for me .... though my code validated for some reason this formula didn't work for me. :-(
May be better suited for someone with more knowledge.
Bottom Line No, I would not recommend this to a friend