Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the concepts and grammatical rules of css

Shulou Source: shulou.com Published: 2022-06-01 06:37:40 09月29日 Update

This article mainly shows you "what are the concepts and grammatical rules of css". The content is simple and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "what are css concepts and grammatical rules?"

Css

Full name Cascading Style Sheet

Introducing css into html pages

1, written in the head tag

two,

3, embedded styl

Syntax:

Selector {

Attribute name: attribute valu

Proterty1:value

Width:100px

/ * Notes * /

...

Browser private properties

Chrome,safari

-webkit-

Firefox

-moz-

IE

-ms-

Opera

-o-

Attribute value syntax

Padding: [| | auto] {1pm 4}

Grammatical description

1, basic element: refers to key words such as length auto in grammar

2. The combination conforms to: it means that the grammatical descriptions are consistent, and different symbols represent different meanings.

3, quantity symbol: {} and number

Basic elements:

Type: basic type (,.)

Other types (,.)

Symbol: (/,)

Inherit, initial

Combination coincidence

Spaces: the order of numbers must be the same and the number must be the same, as follows

Legal value: 12px arial

Illegal: arial 12px

12px

& &: & & two values must appear and do not need to be in the same order

Legal: green 2px

1em blue

Illegal: 1em

| |: at least one occurs. The order is not required. |

| |: only one of them can appear, not at the same time |

: bold [|] grouping function

Quantity symbol:

None: indicates that the basic element can only appear once

+: appear one or more times [,] +

Legal values: # fff, red, gray

? : may or may not appear as an optional inset? & &

Inset blue

Red

{}: indicates that the basic element appears at least several times and at most several times {2pr 4}

*: can appear 0J1, or more than once

#: need to appear one or more times, separated by commas multiple times

@ rules

@ identifier xxx

@ identifier xxx {}

Commonly used: @ media

@ keyframes

@ font-face

The above is all the content of the article "what are the concepts and grammatical rules of css?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Grammar rules elements attributes symbols concepts different legal content quantity article type order consistency identity identifier learning help combination two Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Microsoft Huawei OPPO Reno vpn