因为他们不是兄弟姐妹。如果将:not选择器更改为父div,它将起作用。
div:first-of-type{background-color:lime;} 结果如下: 规范 Specification Status Comment Selectors Level 4The definition of ':first-of-type' in that specification. Working Draft Matching elements are not required to have a parent. Selectors Level 3The definition of ':first-of-type' in that spe...
first 如果元素是第一个使用修饰符的子元素 last 如果元素是最后一个使用修饰符的子元素 only 如果元素是唯一使用修饰符的子元素 odd 如果元素是奇数编号的子元素 even 如果元素是偶数编号的子元素 first-of-type 如果元素是其类型的第一个子元素 last-of-type 如果元素是其类型的最后一个子元素 only-of-type ...
[css-scoping] First pass at adding :has-slotted (#10959) Sep 28, 2024 css-scroll-anchoring-1 [css-scroll-anchoring][editorial] Improve/export the dfn for 'anchor … Dec 4, 2024 css-scroll-snap-1 [css-scroll-snap-1] Define selection of snap area when there are mult… Apr 12, 2024...
In particular, the BundleCollection class has a couple of features that are worth mentioning even though they’re mostly useful when script files—rather than CSS files—are bundled. The first feature is ordering. The BundleCollection class has a property named Orderer of type I...
A cluster switch system (CSS) can be upgraded in one of the following ways: traditional upgrade, fast upgrade, split upgrade, and in-service software upgrade (ISSU). During a split upgrade, the standby switch first restarts with the new system software for an upgrade, and the master switch...
:hover, :active, :not, :first-of-type, :only-child, :empty Regardless of the specifics of pseudo-elements and pseudo-classes, the syntax and application are essentially the same in both. Although the :hover pseudo-class is logical and dynamic, other pseudos, such...
top之外所以的div的盒子模型都会变成flex */ div:not(.teaser-left, .teaser-right, .teaser-top) { display: flex; } /* 除了最后一个以外的div的margin-right都会变为0 */ div:not(:last-child) { margin-right: 0; } /* 除了第一个以外的div的padding都会变成0 */ div:not(:first-of-type) ...
Some limitations make this editor less than ideal for some users. First, Notepad++ only works for Microsoft Windows. If you’re working on any other operating system, like macOS, for example, then you’ll have to use another editor.
If not specified, it has no effect on the <image-set-option>. Tests An image-set() function contains a list of one or more <image-set-option>s, and must select only one of them to determine what image it will represent: First, remove any <image-set-option>s from the list that...