我希望我的水平列表中的子弹位于每个列表项之间的中间/中心。我想把项目符号放在每一项之间
下面是我的css代码:.tags-mid {
padding: 20px;
margin-top: 15px;
text-align: center;
}
.tags-mid ul {
font-size: 25px;
font-family: 'Open Sans', sans-serif;
}
.tags-mid li {
display: inline;
line-height: 25px;
padding-right: 20px;
padding-left: 20px;
}
.tags-mid li:after {
content: " · ";
}
.tags-mid li:last-child:after {
content: "";
}
.tags-mid a {
color: #000;
text-transform: uppercase;
text-decoration: none;
}
.tags-mid a:hover {
color: #000;
text-decoration: none;
}
尝试将padding
应用于:after
伪元素,而不是应用于列表项。下面是一个jsfiddle的链接:http://jsfiddle.net/GeD4K/