Bo
|
CSS3 Borders(Fg. 1) 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.
All web browsers (excluding Internet Explorer 8 and below) supports the border-radius and box-shadow property. However, Internet Explorer does not support the border-image property. Safari 5 and older versions requires the codefix -webkit- while Opera requires the codefix -o- for the border-image property. |
Fg. 1 (CSS3 Borders)
#example-one {
|
|
Fg. 2.1 (CSS3 Rounded Corners)
div
Fg. 2.2 (CSS3 Rounded Corners)
#example-one {
|
CSS3 Rounded Corners(Fg.s 2) Adding rounded corners in CSS2 was tricky. We had to use different images for each corner.
This Box Has Rounded Corners!
Syntax
border-radius: 1-4 length | % / 1-4 length | %;
The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left. If bottom-left is omitted it is the same as top-right. If bottom-right is omitted it is the same as top-left. If top-right is omitted it is the same as top-left. (Fg. 2.1 & Fg. 2.2) |
|
CSS3 Box Shadow(Fg.s 3) The box-shadow property attaches one or more drop-shadows to the box. This Box Has Shadows!
Syntax
box-shadow: h-shadow v-shadow blur scodead color inset;
The box-shadow property attaches one or more drop-shadows to the box. The property is a comma-separated list of shadows, each specified by 2-4 length values, an optional color, and an optional inset keyword. Omitted lengths are 0. (Fg. 3.1 & Fg. 3.2) |
Fg. 3.1 (CSS3 Box Shadow)
div
Fg. 3.2 (CSS3 Rounded Corners)
div
|
|
Fg. 4.1 (CSS3 Border Image)
div
|
CSS3 Border Image(Fg.s 4) The border-image property is a shorthand property for setting the border-image-source, border-image-slice, border-image-width, border-image-outset and border-image-repeat properties.
This Box Has an Image Border!
Syntax
border-image: source slice width outset repeat;
(Fg. 4.1 & Fg. 4.2) |