Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

25. CSS - @ Rules

Lesson 25 of 34 in the free CSS Customization: Zero to Hero notes on Siksha Sarovar, written by Rohit Jangra.

CSS At-Rules

At-rules are standard CSS statements that instruct CSS how to behave. They begin with an at sign (@), followed by an identifier and (if it's a block statement) a pair of braces {}.

1. @import

Used to import a style sheet into another style sheet. @import url("navigation.css");

2. @media

Used to apply styles based on the result of one or more media queries (e.g. screen width, print, etc.).

@media screen and (min-width: 480px) {
  body {
    background-color: lightgreen;
  }
}

3. @font-face

Used to define custom fonts to be used in the document.

@font-face {
  font-family: myFirstFont;
  src: url(sansation_light.woff);
}

div {
  font-family: myFirstFont;
}

4. @keyframes

Used to specify the intermediate steps in a CSS animation sequence.

@keyframes slidein {
  from {
    margin-left: 100%;
    width: 300%;
  }

  to {
    margin-left: 0%;
    width: 100%;
  }
}

5. @charset

Specifies the character encoding used in the style sheet. @charset "UTF-8";