[导入]初学div+css之菜单篇_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:29:23
Original
858 people have browsed it

导航在网站上占有极重要的地位,Table时代的菜单都是用若干个td并排显示而成。
现在,我们可以用语义化的标签,如li来完成。
菜单一:

new document

list-style:none;是去掉列表符号
#nav li下的ul要以li为标准进行绝对定位,这点很重要。
因IE不支持#nav li:hover ul,所以写了一个简单的js来实现,其目的只是给#nav li添加一个mouseover与mouseout事件,
动态改变它的cssName。

菜单二:

new document

这二个简单的菜单主要是对Box模型的理解,最开始我也被box弄糊涂。注意margin、padding、border。


文章来源: http://www.lemongtree.com/Archives/css_menu.aspx
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!