CSS

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.

* Some parts of this feature may have varying levels of support.

CSS 인터페이스는 유용한 CSS 관련 메서드를 가집니다. CSS 인터페이스는 정적 속성과 메서드만 가지고 있으며 아무런 객체도 CSS 인터페이스를 구현하지 않습니다.

속성

CSS 인터페이스는 유틸리티 인터페이스이며, 이러한 형식의 어떠한 객체도 만들수 없으며 오직 정적 속성으로만 정의할 수 있습니다.

정적 속성

CSS.paintWorklet Experimental 보안 컨텍스트

페인팅(painting)에 관련된 모든 클래스를 지닌 워크렛(worklet)에 접근할 수 있습니다.

메서드

정적 메서드

CSS.registerProperty()

사용자 지정 CSS 속성을 등록하고 속성 자료형 검사, 기본값, 상속 여부 등을 설정할 수 있습니다.

CSS.supports()

매개변수로 주어진 속성-값 쌍 또는 조건의 지원 여부를 나타내는 Boolean을 반환합니다.

CSS.escape() Experimental

CSS 선택자로 사용할 문자열을 이스케이프해서 반환합니다.

CSS 팩토리 함수

매개변수로 지정한 값을 담은 새로운 CSSUnitValue를 생성합니다. 단위는 팩토리 함수의 이름입니다. CSS.em(3) // CSSUnitValue {value: 3, unit: "em"}

명세

Specification
CSS Object Model (CSSOM)
# namespacedef-css
CSS Properties and Values API Level 1

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
CSS
Hz() static method
Q() static method
cap() static method
ch() static method
cm() static method
cbq() static method
cqh() static method
cqi() static method
cqmax() static method
cqmin() static method
cqw() static method
deg() static method
dpqm() static method
dpi() static method
dppx() static method
dvb() static method
dvh() static method
dvi() static method
dvmax() static method
dvmin() static method
dvw() static method
em() static method
escape() static method
ex() static method
fr() static method
grad() static method
highlights static property
ic() static method
in() static method
kHz() static method
lh() static method
lvb() static method
lvh() static method
lvi() static method
lvmax() static method
lvmin() static method
lvw() static method
mm() static method
ms() static method
number() static method
paintWorklet static property
Experimental
pc() static method
percent() static method
pt() static method
px() static method
rad() static method
rcap() static method
rch() static method
registerProperty() static method
rem() static method
rex() static method
ric() static method
rlh() static method
s() static method
supports() static method
Parentheses for single-argument version are optional.
svb() static method
svh() static method
svi() static method
svmax() static method
svmin() static method
svw() static method
turn() static method
vb() static method
vh() static method
vi() static method
vmax() static method
vmin() static method
vw() static method

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
In development. Supported in a pre-release version.
In development. Supported in a pre-release version.
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.