CSS
The styling language behind every polished interface — layout, color, typography, responsiveness, and the animations that make it feel alive.
21 មេរៀន
CSS
ចាប់ផ្តើមវគ្គសិក្សាGetting Started
- What is CSS?What CSS does, how it relates to HTML, and the core idea of styling elements with rules.
- Linking CSS to HTMLThe three ways to add CSS to a page — external stylesheets, the style tag, and inline styles — and when to use each.
- CSS Syntax and CommentsThe rules of CSS grammar — declarations, whitespace, shorthand, and how to comment your stylesheets.
Selectors & Cascade
- CSS SelectorsElement, class, ID, and attribute selectors — the different ways to target the elements you want to style.
- Combinators and GroupingCombining selectors with descendant, child, and sibling combinators, plus grouping selectors to avoid repetition.
- Specificity and the CascadeHow the browser decides which rule wins when multiple rules target the same element.
Box Model & Foundations
- The Box ModelContent, padding, border, and margin — how every element's size is actually calculated.
- Colors and UnitsThe ways to express color in CSS, and the difference between absolute and relative length units.
- CSS TypographyControlling fonts, weight, line height, and spacing to make text readable and well-designed.
Layout Systems
- Flexbox BasicsTurning a container into a flex layout and controlling the direction and wrapping of its children.
- Flexbox AlignmentUsing justify-content and align-items to position flex items along and across the main axis.
- CSS Grid BasicsBuilding two-dimensional layouts with grid-template-columns, rows, and named areas.
- PositioningThe position property — static, relative, absolute, fixed, and sticky — and how each changes an element's flow.
Responsive Design
Dynamic & Modern CSS
- Pseudo-classes and Pseudo-elementsStyling based on state and interaction with pseudo-classes, and styling parts of an element with pseudo-elements.
- CSS TransitionsAnimating a property change smoothly over time instead of having it happen instantly.
- CSS AnimationsUsing @keyframes for multi-step animations that transitions alone can't express.
- CSS Custom PropertiesDefining reusable values with --variables and reading them with var, including how they cascade and update live.