What is a At-Regel?
A At-Regel is a CSS statement that can be used to control the output of a web page on a computer monitor or smartphone display and its content. At-Regel n begin with the at sign “@” followed by what is called an identifier that defines the statement. Each of these rules is terminated with a semicolon “;” or another CSS statement. The all general structure is @IDENTIFIER (RULE); – to example @Chartset “utf-8”;
Use and effect of the At-Regel
About 20 At-Regeln are available for use in a CSS file. Commonly used At-Regeln are:
- @charset – instructs the browser to use a specific character set.
- @import – includes an external stylesheet
- @namespace – prefixes all content with a XML namespace
These rules are always executed. So-called conditional At-Regeln are only executed when a certain condition is met.
Example of a conditional At-Regel
Conditional, so-called group rules are defined in CSS Conditionals Level 3. An example of a conditional rule is @media. This statement is used to query the size of the display of the device on which a web page is being shown, so that the display can be controlled accordingly. Each conditional rule can contain a virtually unlimited set of nested statements.
Do you have any more questions?