类.offers-box的div不是兄弟,因此您无法使用nth-child或first-child等。
.offers-box:nth-of-type()不起作用,因为使用:nth-of-type(1)会选择所有.offers-box,因为具有该类的每个元素都是其父级的唯一子元素。 .offers-box是col-md-4中唯一的孩子
与.offers-box a:nth-of-type()相同,每个a是a div中唯一的.offers-box
同一个父.col-md-4中的三个siblings为children和仅 .offers > .row,因此您可以使用它们。
在每个.col-md-4中都有一个.offers-box,因此请使用以下代码来实现您的需求。
让我知道它是否有效


.col-md-4:first-child .offers-box a {
color: red;
}
.col-md-4:nth-child(2) .offers-box a {
color: green;
}
OFFRE STANDARD
Votre activite & commerce est optimises
- Inclus:
- - Vitrine commerciale
- - Systeme de commerce
- - Systeme de reservation
- - Annonces commerciale "SEO"
- - Passerelle multidifusion auto: xml, etc
- - Passerelle multidifusion immo: idx, xml, etc
OFFRE CORPORATE
Votre activite & commerce est optimises
- Inclus:
- - Vitrine commerciale
- - Systeme de commerce
- - Systeme de reservation
- - Annonces commerciale "SEO"
- - Passerelle multidifusion auto: xml, etc
- - Passerelle multidifusion immo: idx, xml, etc
COMMUNICATIONS STANDARD TELEPHONIQUE
Le portail unifie de vos communications d'entreprises