如何对齐链接文本下的材质图标中的向下箭头?我尝试使用:after
伪类,但它没有用。
HTML:
<div class="jump-to-links">
<ul class="list-unstyled">
<li>
<a href="#">Link<i class="material-icons"></i></a>
</li>
<li>
<a href="#">Link<i class="material-icons"></i></a>
</li>
<li>
<a href="#">Link<i class="material-icons"></i></a>
</li>
<li>
<a href="#">Link<i class="material-icons"></i></li></a>
</ul>
</div>
SCSS:
.jump-to-links {
.material-icons {
@include centerX();
bottom: -20px;
color: $purple;
padding: 10px 0px 10px 0px;
}
text-align: center;
a,a:hover {
text-decoration: none;
color: $black;
font-weight: bold;
display: inline-block;
}
ul li {
display: inline-block;
margin-right: 12%;
}
li {
cursor: pointer;
text-align: center;
position: relative;
}
}
JSFIDDLE https://jsfiddle.net/kpvwwveL/6/
答案 0 :(得分:0)
答案 1 :(得分:0)
我发现这是解决对齐问题的最佳方法:
<div class="jump-to-links">
<ul class="list-unstyled">
<li>
<a href="#">Link<i class="material-icons"></i></a>
</li>
<li>
<a href="#">Link<i class="material-icons"></i></a>
</li>
<li>
<a href="#">Link<i class="material-icons"></i></a>
</li>
<li>
<a href="#">Link<i class="material-icons"></i></li></a>
</ul>
</div>
.jump-to-links {
.material-icons {
@include centerX();
bottom: -20px;
color: $purple;
padding: 10px 0px 10px 0px;
}
text-align: center;
a,a:hover {
text-decoration: none;
color: $black;
font-weight: bold;
display: inline-block;
}
ul li {
display: inline-block;
margin-right: 12%;
}
li {
cursor: pointer;
text-align: center;
position: relative;
}
}
答案 2 :(得分:0)