Box Model
| Name |
Syntax |
Description |
|
|
box-sizing
|
box-sizing: content-box | border-box;
|
Defines how the total width and height of an element is calculated. border-box includes padding and border.
|
Details →
|
|
margin
|
margin: top right bottom left;
|
Sets the margin area on all four sides of an element. Accepts length, percentage, or auto.
|
Details →
|
|
padding
|
padding: top right bottom left;
|
Sets the padding area on all four sides of an element. Unlike margin, it cannot be negative.
|
Details →
|
|
width / height
|
width: value; height: value;
|
Sets the width and height of an element. Accepts px, %, em, rem, vw, vh, or auto.
|
Details →
|
|
overflow
|
overflow: visible | hidden | scroll | auto;
|
Specifies what to do when content overflows its block-level container.
|
Details →
|
Layout
| Name |
Syntax |
Description |
|
|
display
|
display: block | inline | inline-block | flex | gr...
|
Defines the display behavior of an element. One of the most fundamental CSS properties.
|
Details →
|
|
position
|
position: static | relative | absolute | fixed | s...
|
Specifies how an element is positioned in a document. Combined with top, right, bottom, left.
|
Details →
|
|
z-index
|
z-index: number | auto;
|
Controls the stacking order of positioned elements. Higher values appear in front.
|
Details →
|
|
float
|
float: left | right | none;
|
Specifies that an element should be placed along the left or right side of its container.
|
Details →
|
Flexbox
| Name |
Syntax |
Description |
|
|
flex-direction
CSS3
|
flex-direction: row | row-reverse | column | colum...
|
Defines the direction flex items are placed in the flex container along the main axis.
|
Details →
|
|
justify-content
CSS3
|
justify-content: flex-start | center | flex-end |...
|
Aligns flex items along the main axis. Controls distribution of space between and around items.
|
Details →
|
|
align-items
CSS3
|
align-items: stretch | flex-start | center | flex-...
|
Aligns flex items along the cross axis (perpendicular to the main axis).
|
Details →
|
|
flex-wrap
CSS3
|
flex-wrap: nowrap | wrap | wrap-reverse;
|
Specifies whether flex items should wrap onto multiple lines when they overflow the container.
|
Details →
|
|
flex
CSS3
|
flex: grow shrink basis;
|
Shorthand for flex-grow, flex-shrink, and flex-basis. Controls how a flex item grows and shrinks.
|
Details →
|
|
gap (flexbox)
CSS3
|
gap: row-gap column-gap;
|
Sets the spacing between flex items. Replaces the margin hack for flex gaps.
|
Details →
|
CSS Grid
| Name |
Syntax |
Description |
|
|
grid-template-columns
CSS3
|
grid-template-columns: repeat(3, 1fr);
|
Defines the number and size of columns in a grid container.
|
Details →
|
|
grid-template-areas
CSS3
|
grid-template-areas: "header header" "sidebar main...
|
Defines named grid areas. Items are placed by referencing area names with grid-area.
|
Details →
|
|
grid-column / grid-row
CSS3
|
grid-column: start / end; grid-row: start / end;
|
Specifies a grid item's size and location by referencing specific grid lines.
|
Details →
|
Typography
| Name |
Syntax |
Description |
|
|
font-family
|
font-family: "Font Name", fallback, generic-family...
|
Specifies the font for text. Always include fallback fonts and a generic family.
|
Details →
|
|
font-size
|
font-size: value;
|
Sets the size of the font. Prefer rem units for accessibility-friendly scaling.
|
Details →
|
|
font-weight
|
font-weight: normal | bold | 100-900;
|
Sets the weight (boldness) of the font. Numeric values range from 100 (thin) to 900 (black).
|
Details →
|
|
line-height
|
line-height: number | length | normal;
|
Sets the height of a line box. Unitless values (like 1.5) are recommended for better scaling.
|
Details →
|
|
text-align
|
text-align: left | center | right | justify;
|
Sets the horizontal alignment of inline content inside a block element.
|
Details →
|
|
text-decoration
|
text-decoration: none | underline | line-through |...
|
Sets the appearance of decorative lines on text. Can combine line, color, style, and thickness.
|
Details →
|
|
text-transform
|
text-transform: none | uppercase | lowercase | cap...
|
Controls the capitalization of text without changing the underlying HTML.
|
Details →
|
|
letter-spacing
|
letter-spacing: normal | length;
|
Sets the horizontal spacing between characters (tracking).
|
Details →
|
Colors & Backgrounds
| Name |
Syntax |
Description |
|
|
color
|
color: value;
|
Sets the foreground color of text content and text decorations.
|
Details →
|
|
background
|
background: color url() repeat position / size;
|
Shorthand for all background properties: color, image, repeat, position, size, and more.
|
Details →
|
|
background-size
|
background-size: auto | cover | contain | width he...
|
Sets the size of background images. cover fills the element; contain fits the entire image.
|
Details →
|
|
opacity
|
opacity: 0 to 1;
|
Sets the opacity of an element. 0 is fully transparent, 1 is fully opaque. Affects all children.
|
Details →
|
|
CSS Variables (custom properties)
CSS3
|
--variable-name: value; var(--variable-name)
|
Custom properties that store reusable values. Defined with -- prefix and used with var().
|
Details →
|
Borders & Effects
| Name |
Syntax |
Description |
|
|
border
|
border: width style color;
|
Shorthand for border-width, border-style, and border-color. Can be set per side.
|
Details →
|
|
border-radius
CSS3
|
border-radius: value;
|
Rounds the corners of an element's border. A value of 50% creates a circle.
|
Details →
|
|
box-shadow
CSS3
|
box-shadow: x-offset y-offset blur spread color;
|
Adds shadow effects around an element. Supports multiple comma-separated shadows.
|
Details →
|
|
text-shadow
CSS3
|
text-shadow: x-offset y-offset blur color;
|
Adds shadow effects to text. Supports multiple comma-separated shadows.
|
Details →
|
|
filter
CSS3
|
filter: blur() | brightness() | contrast() | grays...
|
Applies graphical effects like blur, brightness, and color shifts to an element.
|
Details →
|
Transitions
| Name |
Syntax |
Description |
|
|
transition
CSS3
|
transition: property duration timing-function dela...
|
Shorthand for smooth transitions between CSS property values. Triggered by state changes.
|
Details →
|
|
transition-timing-function
CSS3
|
transition-timing-function: ease | linear | ease-i...
|
Specifies the speed curve of a transition effect.
|
Details →
|
Animations
| Name |
Syntax |
Description |
|
|
animation
CSS3
|
animation: name duration timing iteration directio...
|
Shorthand for all animation properties. Requires a @keyframes rule defining the animation.
|
Details →
|
|
@keyframes
CSS3
|
@keyframes name { from { } to { } }
|
Defines the intermediate steps in a CSS animation sequence.
|
Details →
|
Transforms
| Name |
Syntax |
Description |
|
|
transform
CSS3
|
transform: translate() rotate() scale() skew();
|
Applies 2D or 3D transformations. Multiple functions can be chained together.
|
Details →
|
Other
| Name |
Syntax |
Description |
|
|
cursor
|
cursor: pointer | default | not-allowed | grab | c...
|
Specifies the type of cursor to display when hovering over an element.
|
Details →
|
|
visibility
|
visibility: visible | hidden | collapse;
|
Shows or hides an element without removing it from the document flow (unlike display: none).
|
Details →
|
|
@media (Media Queries)
CSS3
|
@media (max-width: 768px) { }
|
Applies CSS rules based on device properties like screen width, height, or orientation.
|
Details →
|
|
:root pseudo-class
|
:root { --variable: value; }
|
Matches the root element of the document (same as html but with higher specificity). Ideal for CSS variables.
|
Details →
|
|
pseudo-classes
|
selector:hover, :focus, :active, :nth-child(), :no...
|
Keywords added to selectors that specify a special state or position of the element.
|
Details →
|
|
::before / ::after
|
selector::before { content: ""; }
|
Pseudo-elements that insert virtual elements before or after an element's content.
|
Details →
|
|
object-fit
CSS3
|
object-fit: fill | contain | cover | none | scale-...
|
Specifies how an <img> or <video> should be resized to fit its container.
|
Details →
|
No results found. Try a different search term.