小编Bre*_*dan的帖子

单击CSS创建下拉菜单

我需要构建一个包含5个选项的菜单,点击某个选项后会出现一个新的子菜单.我完全不知道怎么做.

/**Navigation */

nav {
  border: 1px solid red;
  float: left;
  margin-right: 35px;
  min-height: 280px;
}

nav li {
  text-decoration: none;
  font-weight: normal;
  color: red;
  list-style: none;
}


/**Content */

#section {
  background-color: ;
  border: 1px solid;
  font: normal 12px Helvetica, Arial, sans-serif;
  margin-left: 180px;
}

.clearfix:before,
.clearfix:after {
  content: " ";
  display: table;
}

.clearfix:after {
  clear: both;
}
Run Code Online (Sandbox Code Playgroud)
<div class="clearfix"></div>
<nav>
  <ul>
    <li><a href="index.html" accesskey="1"> Home </a> </li>
    <li><a href="Portfolio.html" accesskey="2"> Portfolio </a> </li>

    <ul>
      <li><a href="Commercial.html">Commercial</a> </li> …
Run Code Online (Sandbox Code Playgroud)

html javascript css html5 css3

13
推荐指数
3
解决办法
7万
查看次数

标签 统计

css ×1

css3 ×1

html ×1

html5 ×1

javascript ×1