Book Image

concrete5 Beginner's Guide

Book Image

concrete5 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
concrete5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

CSS3 hover effect


While CSS3 isn't well supported yet, it allows us to do things for which we previously needed JavaScript. The use of JavaScript would have been possible for most effects as well, but we're going to look at a CSS3-only effect to get a quick impression to see how easy it is to integrate upcoming web technologies. Make sure you're using an up-to-date browser like Chrome 6 to see the effect.

The effect we're going to use is just a bit more than a classic CSS hover effect which you've probably used before. It starts with something like this:

a {
  color: silver;
}
a:hover {
  color: black;
}

Such a CSS file would display all the links in silver and, when you hover over them, in black. With CSS3, things get a bit fancier, but let's create the new template; we'll see how it looks very quickly.