Thursday, January 19, 2012

CSS3 Dropdown Menu

View Demo CSS3 Dropdown


Preview

The image below shows how the menu will look if CSS3 is not supported.
menu preview

One Gradient Image is Used

A white-transparent image is used to achieve the gradient effect. Because the new CSS3 gradient feature is not supported by all browsers yet, it is safer to use a gradient background image.
gradient image
The instensitiy of the gradient can be changed by shifting the background image up or down. Also, the gradient color can be easily adjusted by changing the background color.
gradient image

CSS Code

I'm not going to explain the CSS line by line. The images below explain the key points on how this dropdown is coded.
menu css
css code

Update Apr 13 2010: Pure CSS Dropdown (No Image Used)

The following demo used CSS gradient and IE gradient filter instead of the gradient image. It works for Webkit browsers, Firefox 3.6+, and IE.
pure css

1 comments:

Anonymous said...

Wow!! really thankful to you for sharing this tutorial. Enjoying making this menu.
WebPortal

Post a Comment