0
右クリックして新しいタブで開くをクリックしない限り、ドロップダウンナビゲーションリンクが機能しません。ドロップダウンナビゲーションリンクが機能しない
HTML
<ul>
<li class="has-child"><a href="#">Content</a>
<ul class="dropdown">
<li><a href="c1.html">Content 1</a></li>
<li><a href="c2.html">Content 2</a></li>
<li><a href="c3.html">Content 3</a></li>
</ul>
</li>
<li><a href="images.html">Images</a></li>
<li><a href="index.html">Home</a></li>
</ul>
CSS CSSのほとんど
.has-child {
position: relative;
left: 0;
}
.has-child:after {
position: absolute;
margin-top: -5px;
top: 27px;
right: 5px;
content: "";
width: 0px;
height: 0px;
border-style: solid;
border-width: 8px 5px 0 5px;
border-color: #F09F47 transparent transparent transparent;
}
@media only screen and (max-width: 45em) {
.has-child:after {
position: absolute;
margin-top: -5px;
top: 25px;
right: 20px;
content: "";
width: 0px;
height: 0px;
border-style: solid;
border-width: 10px 5px 0 5px;
border-color: #307e5c transparent transparent transparent;
}
}
.has-child .dropdown {
position: absolute;
left: -40px;
z-index: 99;
display: none;
margin-top: 10px;
width: 200px;
background: #fffbf5;
border-radius: 6px;
}
@media only screen and (max-width: 45em) {
.has-child .dropdown {
position: relative;
left: 0;
z-index: auto;
margin-top: 0;
display: block;
width: 100%;
border-radius: 0;
}
}
.has-child .dropdown:after {
position: absolute;
top: -10px;
left: 50%;
margin-left: -10px;
content: "";
width: 0px;
height: 0px;
border-style: solid;
border-width: 0 10px 10px 10px;
border-color: transparent transparent white transparent;
}
@media only screen and (max-width: 45em) {
.has-child .dropdown:after {
border: 0;
}
}
.has-child .dropdown li {
float: left;
width: 100%;
font-size: 0.875em;
font-weight: 600;
color: #3EA377;
border-bottom: 1px solid #EFEFEF;
}
@media only screen and (max-width: 45em) {
.has-child .dropdown li {
padding-left: 20px;
background: #fffbf5;
border-bottom-color: #ffebc8;
}
}
.has-child .dropdown li a {
display: block;
padding: 10px;
z-index: 200;
}
だけで位置決めと設計であるが、以上のリンクをクリックしてから私を妨げているものを見ている可能性があります。
:http://codepen.io/narxx/pen/ZOAbZG – Narxx