嗨,我的CSS有问题我之前使用过这条规则,但不知怎的,这次它不起作用
我试图创建一个列表,在每个列表项的底部有一个边框,但最后一个.我有以下代码:
.menu li {
border-bottom: .1rem solid #CCC;
padding: 0;
}
.menu li:last-child {
border: none;
}
.menu li a,
.menu li div {
display: block;
padding: .5rem 0rem .5rem;
border-bottom: .1rem solid #ccc
}Run Code Online (Sandbox Code Playgroud)
<div class="panel">
{% comment %}
{% endcomment %}
<h1>All {{team.abbrev}} {% trans "Songs" %}</h1>
{% for chant in chants %}
{% with chant.team as team %}
<ul class="menu">
<li>
<span>
<h6 style="margin-bottom:0;">
<a href="{% url 'chant' team.slug chant.slug %}">{{ forloop.counter}}) {{ chant.name }}</a>
</h6> …Run Code Online (Sandbox Code Playgroud)