"우리 컬렉션"에 대한 드롭 다운 메뉴 막대를 만들려고 시도하고 있지만 내 시도가 작동하지 않습니다. 누구든지 나 한테 빌려 줄 수있어. 아래는 내 HTML과 CSS입니다. 나는 그것을 내 무작위 시행 착오를 제거하고, UL UL .menu 유지했다 : 나는 오래 전에 만들어진 오래된 메뉴를 가지고 {표시 없음} 메뉴 모음에 드롭 다운 메뉴를 추가하려면 어떻게합니까
* html .clearfix {
height: 1%;
overflow: visible;
}
* + html .clearfix {
min-height: 1%;
}
.clearfix:after {
clear: both;
content: ".";
display: block;
height: 0;
visibility: hidden;
font-size: 0;
}
body {
margin: 0;
padding: 0;
}
.menu {
text-align: center;
background-color: #222;
}
.menu ul {
list-style: none;
height: auto;
padding: 40px;
width: 500px;
float: right;
}
.menu ul li {
float: left;
padding: 0 20px;
font-size: 20px;
font-family: Impact;
}
.menu ul ul {
display: none;
}
.menu ul li a {
color: white;
text-decoration: none;
transition: 350ms;
}
.menu ul li a:hover {
color: #ed702b
}
.title {
float: left;
font-size: 40px;
margin-left: -173px;
margin-top: 37px;
}
.title a {
text-decoration: none;
color: white;
}
.center {
width: 980px;
margin: 0 auto;
}
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link rel="stylesheet" type="text/css" href="includes/site.css">
<title>Home</title>
</head>
<body>
<div class="menu">
<div class="center clearfix" style="height: 124px">
<h1 class="title"><a href="#">My first web</a></h1>
<ul class="clearfix">
<li><a href="#">Home</a>
</li>
<li><a href="#">Our Collections</a>
</li>
<ul>
<li><a href="#">First Collection</a>
</li>
<li><a href="#">Second Collection</a>
</li>
</ul>
<li><a href="#">About Us</a>
</li>
<li><a href="#">Contact Us</a>
</li>
</ul>
</div>
</div>
</body>
</html>
중복 가능성을 [순수 CSS 기반의 드롭 다운 메뉴를 만드는 방법 메뉴?] (http://stackoverflow.com/questions/9953482/how-to-make-a-pure-css-based-dropdown-menu) – xDaevax