我有一堆看起来像...
<div id="hi">
<div class="head">
</div>
<div class="footer">
</div>
</div>
除了一些没有页脚元素,只有页头的元素。我想给没有页脚的元素添加底部边框。我希望像这样做...
#hi:hasno(.footer) {
border-bottom: 1px black dotted;
}
有没有CSS选择器可以用来实现这个效果,还是我应该使用JavaScript的替代方案?