我正在尝试删除显示有下拉菜单的箭头。
我发现了这个:
.top-bar-section .has-dropdown > a:after {
content: "";
display: block;
width: 0;
height: 0;
border: inset 5px;
border-color: transparent transparent transparent rgba(255, 255, 255, 0.5);
border-left-style: solid;
margin-right: 15px;
margin-top: -4.5px;
position: absolute;
top: 50%;
right: 0; }
我用这个代替了它:
.top-bar ul > li.has-dropdown a:after {
content: "";
display: none;
width: 0;
height: 0;
border:0;
border-color: none;
border-left-style: none;
margin-right: 0;
margin-top: 0;
position: absolute;
top: 0;
right: 0;
}
然而,在“关于我们”之后还有空间。任何想法如何删除它?
这是一些HTML:
<section class="top-bar-section">
<ul class="right">
<li><a href="#">Link #1</a></li>
<li><a href="#">Link #2</a></li>
<li><a href="#">Link #3</a></li>
<li><a href="#">Link #4</a></li>
<li><a href="#">Link #5</a></li>
<li class="has-dropdown">
<a href="#">About us</a>
<ul class="dropdown">
<li><a class="first-el" href="#">About the company</a></li>
<li><a href="#">Jobs</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">ToS</a></li>
<li><a class="last-el" href="#">Privacy</a></li>
</ul>
</li>
</ul>
</section>