Home  >  Article  >  Web Front-end  >  [Import] Beginner's div css menu_html/css_WEB-ITnose

[Import] Beginner's div css menu_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:29:23928browse

Navigation occupies a very important position on the website. The menus in the Table era were displayed side by side with several tds.
Now, we can use semantic tags such as li to complete.
Menu 1:

new document

list-style :none; is to remove the list symbol
#nav The ul under li must be absolutely positioned based on li. This is very important.
Because IE does not support #nav li:hover ul, I wrote a simple js to implement it. Its purpose is just to add a mouseover and mouseout event to #nav li,
and dynamically change its cssName.

Menu 2:

new document

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


文章来源: http://www.lemongtree.com/Archives/css_menu.aspx
Statement:
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