纯CSS制作的弹出菜单

Posted on October 06, 2005 by Fdream

最近几天都在搞这些乱七八糟的东西,今天到是捣鼓出了一个纯CSS的弹出菜单,不喜欢JavaScript,代码太烦琐了,大家先看看效果咯:

下面就是完整的代码了:

别急,我说几句先:

一、菜单的上下需要保持宽度和菜单的宽度一致,否则弹出菜单的位置会发生偏移,这个也是偶从偶做的网页中提起出来时才发现的;

二、下面的这一段中的红色部分必不可少,也不可更改:
/*子菜单样式定义*/
.submenu{
clear:both;
float:left;
position:absolute;
width:80px;
padding:0px;
font-size:13px;
}

三、下载不了的请复制下面的代码,为了不破坏我的blog页面,部分代码被我强制换行了,请自己还原!

废话说完了,看代码:
[down=http://fdream.net/blog/wp-content/uploads/2005/10/kh0n_popmenu.txt]点击下载此文件[/down]

popmenu.htm






分享 |
Categories:
Ajax Web
Tags:
, ,
Comments:
Leave a comment
Views:
15,904 Views

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>