CSS Properties Reference
Comprehensive CSS property reference — flexbox, grid, typography, animation, and more.
52 คุณสมบัติ
displayเลย์เอาต์Defines how element is rendered in the document.
block | inline | flex | grid | inline-flex | inline-grid | none | contentspositionเลย์เอาต์Specifies positioning method.
static | relative | absolute | fixed | stickytop / right / bottom / leftเลย์เอาต์Offset for positioned elements.
<length> | <percentage> | autofloatเลย์เอาต์Moves element to left/right of container.
left | right | none | inline-start | inline-endclearเลย์เอาต์Specifies what happens with the element next to a floated element.
none | left | right | both | inline-start | inline-endz-indexเลย์เอาต์Sets stacking order of elements.
auto | <integer>overflowเลย์เอาต์Controls content that overflows element box.
visible | hidden | scroll | auto | clipwidth / heightBox ModelSets element dimensions.
<length> | <percentage> | auto | min-content | max-content | fit-contentmax-width / max-heightBox ModelSets maximum element dimensions.
<length> | <percentage> | none | min-content | max-contentmin-width / min-heightBox ModelSets minimum element dimensions.
<length> | <percentage> | auto | min-content | max-contentmarginBox ModelSpace outside the element border.
<length> | <percentage> | auto (shorthand: top right bottom left)paddingBox ModelSpace between content and border.
<length> | <percentage> (shorthand: top right bottom left)borderBox ModelShorthand for border-width, border-style, border-color.
<border-width> || <border-style> || <color>border-radiusBox ModelRounds corners of element border box.
<length> | <percentage> (1-4 values for corners)box-sizingBox ModelHow width/height is calculated.
content-box | border-boxbox-shadowBox ModelAdds shadow effects around element frame.
<offset-x> <offset-y> <blur> <spread> <color> | inset | noneflex-directionFlexboxSets main axis of flex container.
row | row-reverse | column | column-reverseflex-wrapFlexboxWhether flex items wrap onto multiple lines.
nowrap | wrap | wrap-reversejustify-contentFlexboxAlignment along main axis.
flex-start | flex-end | center | space-between | space-around | space-evenlyalign-itemsFlexboxDefault alignment along cross axis.
stretch | flex-start | flex-end | center | baselinealign-contentFlexboxMulti-line flex container alignment.
flex-start | flex-end | center | space-between | space-around | stretchflexFlexboxShorthand for flex-grow, flex-shrink, flex-basis.
none | auto | <flex-grow> <flex-shrink> <flex-basis>gapFlexboxSpace between flex/grid items.
<length> | <percentage> (row-gap column-gap)grid-template-columnsGridDefines columns of the grid.
none | <track-size> | repeat() | minmax() | auto-fill | auto-fitgrid-template-rowsGridDefines rows of the grid.
none | <track-size> | repeat() | minmax()grid-columnGridShorthand for grid-column-start and grid-column-end.
<line> / <line> | span <number>grid-rowGridShorthand for grid-row-start and grid-row-end.
<line> / <line> | span <number>grid-areaGridNamed grid area or row/column shorthand.
<name> | <row-start> / <col-start> / <row-end> / <col-end>font-sizeการพิมพ์Size of the font.
<length> | <percentage> | xx-small...xx-large | smaller | largerfont-familyการพิมพ์Prioritized list of font family names.
<family-name> | <generic-family> (comma-separated list)font-weightการพิมพ์Weight/boldness of the font.
normal | bold | bolder | lighter | 100–900font-styleการพิมพ์Italic or oblique font.
normal | italic | obliqueline-heightการพิมพ์Height of a line box.
normal | <number> | <length> | <percentage>text-alignการพิมพ์Horizontal alignment of text.
left | right | center | justify | start | endtext-decorationการพิมพ์Decorative lines on text.
none | underline | overline | line-through | blinktext-transformการพิมพ์Capitalization of text.
none | uppercase | lowercase | capitalizeletter-spacingการพิมพ์Space between characters.
normal | <length>word-spacingการพิมพ์Space between words.
normal | <length>colorภาพForeground color of text and text decorations.
<color> (name, hex, rgb(), hsl(), oklch())backgroundภาพShorthand for all background properties.
<color> | <image> | <position> / <size> <repeat> <attachment>background-colorภาพBackground color of element.
<color> | transparentopacityภาพTransparency of element (0–1).
<number> (0 = transparent, 1 = opaque)visibilityภาพShows or hides element without changing layout.
visible | hidden | collapsetransitionแอนิเมชันShorthand for transition properties.
<property> <duration> <easing> <delay>animationแอนิเมชันShorthand for animation properties.
<name> <duration> <easing> <delay> <iteration> <direction> <fill-mode>transformแอนิเมชันApplies 2D/3D transforms.
none | translate() rotate() scale() skew() matrix()will-changeแอนิเมชันHints browser about expected changes for optimization.
auto | scroll-position | contents | transform | opacitycursorUIType of mouse cursor.
auto | default | pointer | text | move | grab | not-allowed | crosshair | ...pointer-eventsUIControls when element can be target of pointer events.
auto | none | all | fill | stroke | painteduser-selectUIControls if text can be selected.
auto | none | text | all | containoutlineUIOutline drawn around element outside border.
<outline-width> || <outline-style> || <color> | noneresizeUIWhether/how user can resize element.
none | both | horizontal | verticalเกี่ยวกับเครื่องมือนี้
เอกสารอ้างอิงนี้ครอบคลุม CSS property ที่ใช้บ่อยที่สุดใน 8 หมวดหมู่: เลย์เอาต์, Box Model, Flexbox, Grid, การพิมพ์, ภาพ, แอนิเมชัน และ UI
ใช้กล่องค้นหาเพื่อกรองตามชื่อ property, คำอธิบาย หรือค่าที่รองรับ ใช้ตัวกรองหมวดหมู่เพื่อดูกลุ่มเฉพาะ
วิธีใช้งาน
- พิมพ์ชื่อ property หรือคำสำคัญในกล่องค้นหาเพื่อกรองรายการ
- เลือกหมวดหมู่จากเมนูแบบเลื่อนลงเพื่อแสดงเฉพาะกลุ่มนั้น
- แต่ละแถวแสดงชื่อ property, แท็กหมวดหมู่, คำอธิบาย และค่าที่รองรับ
กรณีการใช้งาน
นักพัฒนา front-end ค้นหาชื่อ property และค่าที่ถูกต้องระหว่างการพัฒนา
คำถามที่พบบ่อย
- รวม CSS property ทั้งหมดหรือไม่? — ไม่ เอกสารนี้ครอบคลุมเฉพาะ property ที่ใช้บ่อยที่สุดเท่านั้น
- มี property ที่มี vendor prefix ไหม? — ไม่ มีเฉพาะ property มาตรฐานที่ไม่มี prefix เท่านั้น