Home >Web Front-end >HTML Tutorial >Beginner's menu of div css_html/css_WEB-ITnose

Beginner's menu of div css_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:30:441063browse

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。

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