Sideway
output.to from Sideway


CSS at-rule (@ rule)



Draft for Information Only

Content

At-Rule
 Syntax of At-Rule
 Types of At-Rule
  Regular At-Rule
   List of Regular At-Rule
  Nested At-Rule
   Ordinary Nested At-Rule
    List of Ordinary Nested At-Rule
   Conditional Nested At-Rule
    List of Ordinary Nested At-Rule

At-Rule

An at-rule is a CSS rule for the CSS engine instead of matching with the element tag. Therefoe the @rule can be used as a CSS statement to instruct how the CSS engine to behave.

Syntax of At-Rule

An at-rule statement begins with an at sign, "@ (U+0040)", followed by a keyword identifier, and ends with a semicolon, "; (U+0030)" or the next CSS block "{⋯}".

@identifier (rule);
@identifier (rule) {⋯}

Types of At-Rule

There are a few types of at-rule with different syntax according to the function.

Regular At-Rule

The identifier is used to identify the function and the following rule is usually the corresponding value to be specified. The regular at-rule is specific CSS rule for initializing the CSS engine.

List of Regular At-Rule

'@charset'css 2.1to specify the character encoding of the style sheet itself

Link: ./../../sideway/default.asp?qno=190400026 last updated 2019/3/8
'@import'css 1,2,2.1to specify those to be included external style sheets by importing

Link: ./../../sideway/default.asp?qno=190400026 last updated 2016/7/11
'@namespace'to specify the XML namespaces to be used in a CSS style sheet.

Link: ./../../sideway/default.asp?qno=190400026 last updated 2019/3/8

Nested At-Rule

The identifier is used to identify the function and the following rule can contain a subset of additional statements that may also be nested, is usually the corresponding value to be specified. The nested at-rule is a general CSS rule that can be used as a general style sheet statement and a rule set inside conditional group ruels. According to the nature of nested at-rule, teh nested at-rule can further be grouped into ordinary nested at-rule and conditional nested at-rule, also called conditional group rule.

Ordinary Nested At-Rule

The ordinary nested at-rule is used as a ordinary specific CSS rule for CSS engine in CSS style sheet along with CSS rule set for elements. The identifier is used to identify the function and the following rule is usually the corresponding value to be specified.

List of Ordinary Nested At-Rule
'@page'css 2,2.1to specify some specific CSS rules for paged media.

Link: ./../../sideway/default.asp?qno=190400027 last updated 2019/3/8
@font-face An @font-face at-rule is used to specify the external font needed by the style sheet and nest the detailed information of the corresponding font in the additional statement subset. @font-face { font-family: 'WebFont';
src: url('webfont.woff2') format('woff2');
}

Conditional Nested At-Rule

List of Ordinary Nested At-Rule
'@media'css 2,2.1to specify some CSS rules for specified media types conditionally

Link: ./../../sideway/default.asp?qno=190400028 last updated 2019/3/8
@media An @media at-rule is a media matching rule used to specify the nested subset of additional CSS statement according to the specified conditions. @media only screen and (max-width: 600px) {body {background-color: lightblue;}}

©sideway
close

References

  1. http://www.w3.org/TR/1999/REC-html401-1999, 1999, HTML 4.01 Specification: W3C Recommendation, updated 24 December 1999
close

ID: 190400025 Last Updated: 2019/4/25 Revision: Ref:

IMAGE

Home (5)

Business

Management

HBR (3)

Information

Recreation

Hobbies (7)

Culture

Chinese (1097)

English (336)

Reference (66)

Computer

Hardware (149)

Software

Application (187)

Digitization (24)

Numeric (19)

Programming

Web (648)new

CSS (SC)

ASP.NET (SC)

Regular Expression (SC)

HTML

Knowledge Base

Common Color (SC)

Html Entity (Unicode) (SC)

Html 401 Special (SC)

OS (389)

MS Windows

Windows10 (SC)

.NET Framework (SC)

DeskTop (7)

Knowledge

Mathematics

Formulas (8)

Number Theory (206)

Algebra (20)

Trigonometry (18)

Geometry (18)

Calculus (67)

Complex Analysis (21)

Engineering

Tables (8)

Mechanical

Mechanics (1)

Rigid Bodies

Statics (92)

Dynamics (37)

Fluid (5)

Fluid Kinematics (5)

Control

Process Control (1)

Acoustics (19)

FiniteElement (2)

Biology (1)

Geography (1)


Copyright © 2000-2019 Sideway . All rights reserved Disclaimers last modified on 10 Feb 2019