CSS Images Menu using transparency for your website |
| Written by AnaS | |
|
In this CSS tutorial it wil be explained how to create an awesome CSS menu using images and some transparency level.
Let's begin! 1. Put your images on your website and make a link to them like below:
<a href="http://www.tutorial5.com"> <img src="cssmenu1.jpg" border="0" alt="Css images menu"></a> 2. Now we will add some style for setting the images transparency to 50%. Add the following code to every image: style="-moz-opacity:0.5;filter:alpha(opacity=50)"
3. Now, we want to change the transparency of the images back to none when the mouse is over them. We will use onmouseover and onmouseout Javascript events. So, if the mouse is over the image we will apply a style with no transparency (that means n=100 and m=1.0), and when the mouse is not we will apply a style with 50% transpanrency (that means n=50 and m=0.5). So, add the next code to each of your images:
4. And in the end you vode menu should look like below: Hope this tutorial improved your CSS knowledge!
written by barat , October 12, 2007
Why to use something that isn't realy a CSS, and Isn't cross-browser? It doesn't work on Opera ... It's better to use CSS rollovers (using background-position trick) ...
written by Lata , December 15, 2007
Yes I want to make a website in css but i dont know how to start. what is the first step can you send me a web page in css with complete details.
written by maran , February 20, 2008
hi, fine..but that is not Valid XHTML i got a "Parse Error - opacity=50"
written by veronica , April 01, 2008
Just wanted to thank you! I learned how to make my own menu with images...I love how easly explained it was...thanks a bunch! Do you need more help? Ask now!
|
|
| Last Updated ( Monday, 10 September 2007 ) |