Home  >  Article  >  Web Front-end  >  What are the professional terms of css? Introduction to css professional terms

What are the professional terms of css? Introduction to css professional terms

云罗郡主
云罗郡主forward
2018-10-15 15:17:333376browse

This article brings you what are the professional terms of CSS? The introduction of CSS professional terminology has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

1. Properties

such as height, color, etc. are called css properties.

2. Values ​​

in css, such as: 10px, 50%, #ccc, etc. are all called css values. The more common type values ​​are: integer value, numerical value, percentage value, length value, color value

3. Keywords

specifically refer to some very key words in CSS. For example, solid, absolute, block, etc. are all keywords

4. Variables

There are currently very few variables in css that can be called variables, such as: currentColor

5. Length unit

(1). Relative length units: divided into relative font length units and relative viewport length units

Relative font length units, such as em, ex, rem, ch (width of character 0)

Relative viewport Length units, such as vh, vw, vmin and vmax

(2). Absolute length unit: such as px, pt, cm, etc.

6. Function symbol

value is specified in the form of a function, mainly used to represent color (rgba and hsla), background image address (url ), calculation (calc), transition effects, etc. Such as rgba (0,0,0,0.5), url ('a.png'), scale (-1)

7. Attribute value

All content after the attribute colon is collectively called is the attribute value. For example: 1px solid rgb (0,0,0)

8. Declaration

The attribute name plus the attribute value is the declaration, for example: color: transparent;

9. Declaration block

A declaration block is a series of declarations wrapped in curly braces {}, for example:

{
height: 100px;
color: #ccc;
}

10. Rules or rule sets

The selector appears, and is followed by Follow the declaration block. Such as

.nav {
color: tansparent;
width: 23px;
}

11. Selector

Class selector, selector starting with ".", many elements can apply the same class selector, such as:. nav,. active

ID selector, a selector starting with "#", generally points to a unique element. For example: #header, #page

attribute selector, refers to the selector containing [], such as: input[type="text"] { }, [title~="css-world"] { }

Pseudo-class selector refers to a selector preceded by an English colon, such as: :first-child, :nth-child (1), :hover

Pseudo-element selector, there are Selector of two consecutive English colons, such as: ::after, ::befor

12. Relationship selector

Descendant selector, selects descendant elements, connected by spaces, such as: .parent .child { }

Adjacent descendant selector (child selector), selects the first-level child elements (sons) that comply with the rules, and ignores grandchildren, great-grandchildren, second child elements, etc., use > Connection, (IE7 and above) such as: .parent>.first-child { }

Sibling selector, selects all sibling elements after the current element, ~ connection, (IE7 and above) such as: .nav~ .siblings { }

Adjacent sibling selector, selects and connects sibling elements adjacent to the current element (IE7 and above) such as: .header .nav { }

13. @Rule

Some rules starting with the @ character, such as media query @media, font @font-face

The above is what are the professional terms for css? A complete introduction to css professional terms. If you want to know more about CSS video tutorial, please pay attention to the PHP Chinese website.


The above is the detailed content of What are the professional terms of css? Introduction to css professional terms. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete