Monday, April 23, 2012


CSS3 Borders

With CSS3, you can create rounded borders, add shadow to boxes, and use an image as a border - without using a design program, like Photoshop.
In this chapter you will learn about the following border properties:
  • border-radius
  • box-shadow
  • border-image

CSS3 Rounded Corners
Adding rounded corners in CSS2 was tricky. We had to use different images for each corner.
In CSS3, creating rounded corners is easy.
In CSS3, the border-radius property is used to create rounded corners:

This box has rounded corners!

div
{
border:2px solid;
border-radius:25px;
-moz-border-radius:25px; /* Firefox 3.6 and earlier */
}

CSS3 Box Shadow

In CSS3, the box-shadow property is used to add shadow to boxes:
div
{
box-shadow: 10px 10px 5px #888888;}

No comments:

Post a Comment