CSS_Complete_Notes
CSS_Complete_Notes
1. Introduction to CSS
- CSS (Cascading Style Sheets) is used to style and layout web pages.
- Types of CSS:
- Inline CSS
- Internal CSS
- External CSS
2. CSS Syntax
Example:
p{
color: red;
font-size: 16px;
3. CSS Selectors
- Attribute Selectors
- Content
- Padding
- Border
- Margin
- Example:
div {
width: 100px;
padding: 10px;
margin: 20px;
5. CSS Flexbox
- Key properties:
- display: flex;
- justify-content
- align-items
- flex-wrap
6. CSS Grid
- Properties:
- display: grid;
- grid-template-rows
- grid-template-columns
- gap
- Example:
.container {
display: grid;
gap: 10px;
7. Responsive Design
- Example:
body {
background-color: lightblue;
}
Example:
div {
Example:
@keyframes example {
0% {background-color: red;}
9. Advanced Topics
Example:
:root {
--main-color: blue;
p{
color: var(--main-color);
}