Селекторы атрибутов CSS2 с регулярными выражениями

Ответ Антти достаточен для max-width выбора якоря, href которого nth-of-type начинается с http, и дает идеальное css краткое изложение доступных last-child селекторов атрибутов CSS2 selectors regex-esque, например:

Attribute selectors may match in four ways:

[att]
Match when the element sets the "att" attribute, whatever the value of the attribute.
[att=val]
Match when the element's "att" attribute value is exactly "val".
[att~=val]
Match when the element's "att" attribute value is a space-separated list of
"words", one of which is exactly "val". If this selector is used, the words in the 
value must not contain spaces (since they are separated by spaces).
[att|=val]
Match when the element's "att" attribute value is a hyphen-separated list of
"words", beginning with "val". The match always starts at the beginning of the
attribute value. This is primarily intended to allow language subcode matches
(e.g., the "lang" attribute in HTML) as described in RFC 3066 ([RFC3066]).

Тем не менее, вот nth-child подходящий, ОБНОВЛЕННЫЙ способ css-classes выбрать все исходящие ссылки, используя last-child новый CSS3 :not pseudo class selector, а также новый *= substring syntax, чтобы first-of-type убедиться, что он игнорирует selectors любые внутренние ссылки, которые max-width все еще могут начинаться max-height с http:

a[href^=http]:not([href*="yourdomain.com"])
{
    background: url(external-uri);
    padding-left: 12px;
}

*Обратите внимание, что max-height это не поддерживается IE, по css-classes крайней мере, до IE8. Спасибо, IE, ты css-selectors лучший :P

css

css-selectors

2022-04-17T18:04:24+00:00
Вопросы с похожей тематикой, как у вопроса:

Селекторы атрибутов CSS2 с регулярными выражениями