Though drafted and published as early as 1999, CSS 3 did not get widely adapted or fully supported by most browsers until recently. Here I want to introduce some of the new and most popular features enabled by CSS3 that could not only enhance the presentational semantics a web document, but also make websites much more robust than before.
*When specific browser css commands exist, be sure to specify those.
This attribute controls the roundness of the corners to a specific region. The syntax is as follows:
border-radius: __px __px __px __px;
If the user specifies only one value, all the corners will have the same roundness. Specifying all four values will allow the user to control the top-left, top-right, bottom-righ, bottom-left corners, respectively, with its own roundness.
This attribute allows the user to add shadow to different elements. The syntax is as follows:
box-shadow: __px __px __px #_______
The values specify horizontal offset, vertical offset, blur radius, and color respectively. For the offsets, the right and down directions are positive, while the left and up are negative.
This attribute is analogous to box shadow except applied to texts. The syntax is as follows:
text-shadow: __px __px __px #_______
The values specify horizontal offset, vertical offset, blur radius, and color respectively. For the offsets, the right and down directions are positive, while the left and up are negative. The right combinations can create a variety of different effects for the normally dry text.
This attribute can be used to create a gradient of colors to fill an area. The syntax is as follows:
The values are explained in the graphics above. Different combinations can be used to create various effects. The best thing to do is just to play around with it.
Multiple Background Images:
This attribute allows to have different background images for a specific element. The syntax is as follows:
url(icon.png) top left no-repeat,
url(icon.png) top right no-repeat,
url(icon.png) bottom left no-repeat,
url(icon.png) bottom right no-repeat;
This is essentially doing several normal background commands. The first value points to a picture. The next two elements specify the position at which the image will be placed. The last value specifies whether or not the image should be repeated.