From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../getpropertyvalue/index.html | 114 +++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 files/ru/web/api/cssstyledeclaration/getpropertyvalue/index.html (limited to 'files/ru/web/api/cssstyledeclaration/getpropertyvalue') diff --git a/files/ru/web/api/cssstyledeclaration/getpropertyvalue/index.html b/files/ru/web/api/cssstyledeclaration/getpropertyvalue/index.html new file mode 100644 index 0000000000..853bd5c215 --- /dev/null +++ b/files/ru/web/api/cssstyledeclaration/getpropertyvalue/index.html @@ -0,0 +1,114 @@ +--- +title: CSSStyleDeclaration.getPropertyValue() +slug: Web/API/CSSStyleDeclaration/getPropertyValue +translation_of: Web/API/CSSStyleDeclaration/getPropertyValue +--- +

{{ APIRef("CSSOM") }}

+ +

CSSStyleDeclaration.getPropertyValue() интерфейс метода, который возвращает {{domxref('DOMString')}}, указанного CSS свойства.

+ +

Синтаксис

+ +
var value = style.getPropertyValue(property);
+ +

Параметры

+ + + +

Возвращаемое значение

+ + + +

Пример

+ +

Следующий JavaScript код проверяет отмечен ли margin как important в CSS правиле селектора:

+ +
var declaration = document.styleSheets[0].rules[0].style;
+var value = declaration.getPropertyValue('margin'); // "1px 2px"
+
+ +

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

+ + + + + + + + + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('CSSOM', '#dom-cssstyledeclaration-getpropertyvalue', 'CSSStyleDeclaration.getPropertyValue()')}}{{Spec2('CSSOM')}} 
{{SpecName('DOM2 Style', 'css.html#CSS-CSSStyleDeclaration', 'CSSStyleDeclaration')}}{{Spec2('DOM2 Style')}} 
+ +

Браузерная совместимость

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Базовая поддержка{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Базовая поддержка{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
-- cgit v1.2.3-54-g00ecf