Sep
1
2012

CSS3 Cool features

CSS3 allowing you to develop more efficient and better-looking sites. Many of the new features in the latest CSS revision (CSS3) are rich and take the quality of our designs to the next level.

Here are common useful features of CSS3 for web developers: 

Nicer Fonts

With CSS3, you can now use various types of fonts as long as it can be called from an internet-enabled location. It will be displayed anywhere on the site when you call the front by using  @font-face feature.

Example:

@font-face { 
  font-family: Snoofer; 
  src: url('http://example.com/font/Snoofer.ttf'); 
}

h1
 font-family: Snoofer; 
 font-size: 3.5em; 
 letter-spacing: 2px;
}

Rounded Corners

Its a nice feature of CSS3 that we don't have to use image anymore to have a nice rounded corners. the border-radius property is used to create rounded corners

Example:

div {
  border: 2px solid;
  border-radius: 10px;
  -moz-border-radius: 10px; /* Firefox 3.6 and earlier */
  -webkit-border-radius: 10px; /* for Safari and Chrome */
}

Text Shadows

The text-shadow property allows you to add a dropshadow underneath HTML text elements.

Example: (3px to the right, 6px to the bottom of the text, and with a blur of radius of 4px, to all h1 elements.)

h1 {
  text-shadow: #000 3px 6px 4px;
}

Multiple Backgrounds

CSS3 lets you apply multiple backgrounds to an element using several properties. Included in this list of properties is background-image, background-repeat, background-position and background-size. Separate backgrounds by using commas.

Example:

body {
  background:
   url(images/bottom-left.png) top right fixed no-repeat,
   url(images/bottom-right.png) top left fixed no-repeat,
   url(images/top-left.png) bottom left fixed no-repeat,
   url(images/top-right.png) bottom right fixed no-repeat;
   background-color: #ffffff;
}

Opacity

Other nice  feature to come in CSS3 is opacity to bring up a better look & feel of the website.

Example:

#phiID {
  background: #000;
  opacity:  0.5;
}

Read more features about CSS3: http://www.w3schools.com/cssref/

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Calendar

<<  February 2021  >>
MoTuWeThFrSaSu
25262728293031
1234567
891011121314
15161718192021
22232425262728
1234567

View posts in large calendar