From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/ru/web/css/id_selectors/index.html | 117 +++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 files/ru/web/css/id_selectors/index.html (limited to 'files/ru/web/css/id_selectors') diff --git a/files/ru/web/css/id_selectors/index.html b/files/ru/web/css/id_selectors/index.html new file mode 100644 index 0000000000..f8a61526dc --- /dev/null +++ b/files/ru/web/css/id_selectors/index.html @@ -0,0 +1,117 @@ +--- +title: Селекторы по ID +slug: Web/CSS/ID_selectors +translation_of: Web/CSS/ID_selectors +--- +
{{ CSSRef() }}
+ +

Краткое описание

+ +

В HTML-документах CSS-селекторы по ID производят выборку всех элементов по ID, полностью совпадающих с селектором.

+ +

Синтаксис

+ +
#id_value { style properties }
+ +

То же самое  — {{ Cssxref("Attribute_selectors", "селектор по атрибутам") }}:

+ +
[id=id_value] { style properties }
+ +

Пример

+ +
span#identified {
+  background-color: DodgerBlue;
+}
+
+ +
<span id="identified">Тут span с каким-то текстом.</span>
+<span>Здесь тоже span.</span>
+
+ +

{{ EmbedLiveSample('Example', 200, 50) }}

+ +

Спецификации

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{ SpecName('CSS4 Selectors', '#id-selectors', 'ID selectors') }}{{ Spec2('CSS4 Selectors') }} 
{{ SpecName('CSS3 Selectors', '#id-selectors', 'ID selectors') }}{{ Spec2('CSS3 Selectors') }} 
{{ SpecName('CSS2.1', 'selector.html#id-selectors', 'ID selectors') }}{{ Spec2('CSS2.1') }} 
{{ SpecName('CSS1', '#id-as-selector', 'ID selectors') }}{{ Spec2('CSS1') }}Изначальное определение
+ +

Поддержка браузерами

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
-- cgit v1.2.3-54-g00ecf