Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. CSS
  3. Reference

CSS reference

Use thisCSS reference to browse analphabetical index of all of the standardCSSproperties,pseudo-classes,pseudo-elements,data types,functional notations andat-rules. You can also browsekey CSS concepts and a list ofselectors organized by type. Also included is a briefDOM-CSS / CSSOM reference.

Basic rule syntax

Style rule syntax

style-rule ::=    selectors-list {      properties-list    }

Where:

selectors-list ::=    selector[:pseudo-class] [::pseudo-element]    [, selectors-list]properties-list ::=    [property : value] [; properties-list]

See the index ofselectors,pseudo-classes, andpseudo-elements below. The syntax for each specifiedvalue depends on the data type defined for each specifiedproperty.

Style rule examples

css
strong {  color: red;}div.menu-bar li:hover > ul {  display: block;}

For a beginner-level introduction to the syntax of selectors, see ourguide on CSS Selectors. Be aware that anysyntax error in a rule definition invalidates the entire rule. Invalid rules are ignored by the browser. Note that CSS rule definitions are entirely (Unicode)text-based, whereas DOM-CSS / CSSOM (the rule management system) isobject-based.

At-rule syntax

As the structure of at-rules varies widely, please seeAt-rule to find the syntax of the specific one you want.

Index

Note:This index does not include SVG-exclusive presentation attributes, which can be used as CSS properties onSVG elements.

Note:The property names in this index donot include the JavaScript names which do differ from the CSS standard names.

-

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

Selectors

The following are the variousselectors, which allow styles to be conditional based on various features of elements within the DOM.

Basic selectors

Basic selectors are fundamental selectors; these are the most basic selectors that are frequently combined to create other, more complex selectors.

Grouping selectors

Selector listA, B

Specifies that bothA andB elements are selected. This is a grouping method to select several matching elements.

Combinators

Combinators are selectors that establish a relationship between two or more simple selectors, such as "A is a child ofB" or "A is adjacent toB", creating a complex selector.

Next-sibling combinatorA + B

Specifies that the elements selected by bothA andB have the same parent and that the element selected byB immediately follows the element selected byA horizontally.

Subsequent-sibling combinatorA ~ B

Specifies that the elements selected by bothA andB share the same parent and that the element selected byA comes before—but not necessarily immediately before—the element selected byB.

Child combinatorA > B

Specifies that the element selected byB is the direct child of the element selected byA.

Descendant combinatorA B

Specifies that the element selected byB is a descendant of the element selected byA, but is not necessarily a direct child.

Column combinatorA || BExperimental

Specifies that the element selected byB is located within the table column specified byA. Elements which span multiple columns are considered to be a member of all of those columns.

Pseudo

Pseudo classes:

Specifies a special state of the selected element(s).

Pseudo elements::

Represents entities that are not included in HTML.

Concepts

Syntax and semantics

Values

Layout

DOM-CSS / CSSOM

Major object types

Important methods

See also

External Links

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp