小编Dan*_*iel的帖子

除了第一个孩子和最后一个孩子之外的CSS选择器

我正在建立一个非常先进的网站.我的问题:是否可以选择除了:first-child和之外的所有其他孩子:last-child?我知道有一个:not()选择器,但它不适用于不在括号中的多个选择器.这就是我所拥有的:

#navigation ul li:not(:first-child, :last-child) {
    background: url(images/UISegmentBarButtonmiddle@2x.png);
    background-size: contain;
}
Run Code Online (Sandbox Code Playgroud)

html css css-selectors

95
推荐指数
2
解决办法
5万
查看次数

标签 统计

css ×1

css-selectors ×1

html ×1