Home >Web Front-end >HTML Tutorial >纯 CSS 实现水平下拉菜单_html/css_WEB-ITnose

纯 CSS 实现水平下拉菜单_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-21 09:06:081141browse


#menu {

  font-family: Arial;

  font-size: 14px;

  width: 500px;

  overflow: hidden;

}


#menu, #menu ul {

  list-style-type: none;

  background: #A3C159;

  margin: 0;

  padding: 0;

}


#menu li {

  float: left;

}


#menu li a {

  display: block;

  padding: 10px 15px;

  color: #FFF;

  text-decoration: none;

  border-right: 1px solid #FFF;

}

#menu li a:hover {

  background: #1BA6B2;

}


#menu li ul li {

  float: none;

}


#menu li ul li a {

  border-top: 1px solid #FFF;

}


#menu li ul {

  display: none;

  position: absolute;

}


#menu li:hover ul {

  display: block;

}


备注:不支持 IE6。

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