English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS reference manual

CSS @rules

CSS attributes大全

Comprehensive Manual of CSS Properties (By Function)

CSS attributes can be searched in alphabetical order, this part includes the latest CSS3A complete list of standard attribute specifications. All attributes are divided into animation attributes, background attributes, border attributes, color attributes, height and width dimensions, Flex flexible box, font attributes, list item attributes, margin attributes, outline attributes, text font attributes, visual attributes, and so on.

Animation attribute (Animation)

AttributeDescription
animation Specify animation based on keyframes.
animation-delay Specify when the animation should start.
animation-direction Specify whether the animation should play in reverse in alternating cycles.
animation-duration Specify the number of seconds or milliseconds the animation should take to complete one cycle.
animation-fill-mode Specify how to apply styles to the target of the CSS animation before and after execution.
animation-iteration-count Specify the number of times the animation should play before stopping.
animation-name Specify@keyframesThe name of the defined animation applied to the selected element.
animation-play-state Specify whether the animation should run or pause.
animation-timing-function Specify how CSS animation should proceed within each cycle.

Background attribute (Background)

AttributeDescription
backgroundDefine various background properties in one statement.
background-attachmentSpecify whether the background image is fixed in the viewport or scrolls.
background-clip Specify the drawing area of the background.
background-colorDefine the background color of the element.
background-imageDefine the background image of the element.
background-origin Specify the positioning area of the background image.
background-positionDefine the origin of the background image.
background-repeatSpecify whether/How to tile the background image.
background-size Specify the size of the background image.

Border attribute (Border)

AttributeDescription
borderSet the width, style, and color of the border on all four sides of the element.
border-bottomSet the width, style, and color of the bottom border of the element.
border-bottom-colorSet the color of the bottom border of the element.
border-bottom-left-radius Define the shape of the lower left corner of the element.
border-bottom-right-radius Define the shape of the lower right boundary of the element.
border-bottom-styleSet the style of the bottom border of the element.
border-bottom-widthSet the width of the bottom border of the element.
border-colorSet the color of the border on all four sides of the element.
border-image Specify how to use an image instead of a border style.
border-image-outset Specify the number of times the image border area extends beyond the border area.
border-image-repeat Specify whether the image border should repeat, round, or stretch.
border-image-slice Specify the inward offset of the image border.
border-image-source Specify the position of the image to be used as a border.
border-image-width Specify the width of the image border.
border-leftSet the width, style, and color of the left border of the element.
border-left-colorSet the color of the left border of the element.
border-left-styleSet the style of the left border of the element.
border-left-widthSet the width of the left border of the element.
border-radius Define the shape of the boundary corners of the element.
border-rightSet the width, style, and color of the right border of the element.
border-right-colorSet the color of the right border of the element.
border-right-styleSet the style of the right border of the element.
border-right-widthSet the width of the right border of the element.
border-styleSet the style of the border on all four sides of the element.
border-topSet the width, style, and color of the top border of the element.
border-top-colorSet the color of the top border of the element.
border-top-left-radius Define the shape of the upper left corner of the element.
border-top-right-radius Define the shape of the upper right corner of the element.
border-top-styleSet the style of the top border of the element.
border-top-widthSet the width of the top border of the element.
border-widthSet the border width of all four sides of the element.

Color attribute (Color)

AttributeDescription
colorSpecify the color of the element text.
opacity Specify the opacity of the element.

Size attribute (Size)

AttributeDescription
heightSpecify the height of the element.
max-heightSpecify the maximum height of the element.
max-widthSpecify the maximum width of the element.
min-heightSpecify the minimum height of the element.
min-widthSpecify the minimum width of the element.
widthSpecify the width of the element.

Content attribute (Content)

AttributeDescription
contentInsert generated content.
quotesSpecify the quotes used for embedded quotes.
counter-resetCreate or reset one or more counters.
counter-incrementIncrement one or more counter values.

Flexible Flex Box Layout (Flex)

AttributeDescription
align-content Specify the alignment method of the flexible container items within the flexible container.
align-items Specify the default alignment method for items in the flex container.
align-self Specify the alignment method of the selected item in the flexible container.
flex Specify the component of the flexible length.
flex-basis Specify the initial main size of the flexible item.
flex-direction Specify the direction of the flexible item.
flex-flow flex-directionandflex-wrapAbbreviated properties of the attribute.
flex-grow Specify how flexible items grow relative to other items within the flex container.
flex-shrink Specify how flexible items shrink relative to other items within the flex container.
flex-wrap Specify whether flexible items should be wrapped.
justify-content Specify how flexible items align along the main axis of the flexible container after any flexible length and automatic page margin have been resolved.
order Specify the display and layout order of flexible items in the flexible container.

Font attribute (Fonts)

AttributeDescription
fontDefine various font properties in one declaration.
font-familyDefine the font list of the element.
font-sizeDefine the font size of the text.
font-size-adjust Maintain the readability of the text when font fallback occurs.
font-stretch Choose a normal, condensed, or expanded font from the font.
font-styleDefine the font style of the text.
font-variantSpecify the font variant.
font-weightSpecify the font weight of the text.

List item attribute (Lists)

AttributeDescription
list-styleDefine the display style of lists and list elements.
list-style-imageSpecify the image used as the list item marker.
list-style-positionSpecify the position of the list item marker.
list-style-typeSpecify the marker style of the list item.

Margin attribute (Margin)

AttributeDescription
marginSet the margin on all four sides of the element.
margin-bottomSet the bottom margin of the element.
margin-leftSet the left margin of the element.
margin-rightSet the right margin of the element.
margin-topSet the top margin of the element.

Multi-column layout attribute (Column)

AttributeDescription
column-count Specify the number of columns in multi-column elements.
column-fill Specify how to fill the columns.
column-gap Specify the spacing between columns of multi-column elements.
column-rule Specify the line or 'rule' drawn between each column of multi-column elements.
column-rule-color Specify the color of the rule drawn between columns in a multi-column layout.
column-rule-style Specify the style of the rule drawn between columns in a multi-column layout.
column-rule-width Specify the regular width drawn between columns in a multi-column layout.
column-span Specify how many columns the element spans in a multi-column layout.
column-width Specify the optimal width of columns in multi-column elements.
columns Used to setcolumn-widthandcolumn-countAbbreviated properties of the attribute.

Outline attributes (Outline)

AttributeDescription
outlineSet the width, style, and color of all four sides of the element outline.
outline-colorSet the color of the outline.
outline-offset Set the space between the outline and the element border.
outline-styleSet the outline style.
outline-widthSet the width of the outline.

Padding attributes (Padding)

AttributeDescription
paddingSet padding on all four sides of the element.
padding-bottomSet the padding to the bottom of the element.
padding-leftSet the padding to the left of the element.
padding-rightSet the padding to the right of the element.
padding-topSet the padding to the top of the element.

Print attributes (Print)

AttributeDescription
page-break-afterInsert a page break after the element.
page-break-beforeInsert a page break before the element.
page-break-insideInsert a page break within the element.

Table attributes (Table)

AttributeDescription
border-collapseSpecify whether to connect or separate the table cell borders.
border-spacingSet the spacing between the borders of adjacent table cells.
caption-sideSpecify the position of the table caption.
empty-cellsShow or hide the border and background of empty table cells.
table-layoutSpecify the table layout algorithm.

Text attributes (Text)

AttributeDescription
directionDefine the text direction/Writing direction.
tab-size Specify the length of the tab.
text-alignSet the horizontal alignment of inline content.
text-align-last Specify whentext-alignhow to align the last line of the block or the line before the forced line break whenjustify
text-decorationSpecify the decoration to be added to the text.
text-decoration-color specified colortext-decoration-line
text-decoration-line Specify which line decoration to add to the element.
text-decoration-style Specifytext-decoration-lineThe line style specified by the property
text-indentIndent the first line of text.
text-justify Specify whentext-alignThe alignment method to be used when the property is set tojustify
text-overflow Specify how the text content will be displayed when it overflows the block container.
text-shadow Apply one or more shadows to the text content of the element.
text-transformConvert the case of the text.
line-heightSet the height between lines of text.
vertical-alignSet the vertical position of the element relative to the current text baseline.
letter-spacingSet the additional spacing between letters.
word-spacingSet the spacing between words.
white-spaceSpecify how to handle whitespace within an element.
word-break Specify how to break lines within words.
word-wrap Specify whether to break words when content exceeds the container boundary.

Transform Attribute (Transform)

AttributeDescription
backface-visibility Specify whether the 'back' of the transformed element is visible when facing the user.
perspective Define the perspective from which all child elements of the object are viewed.
perspective-origin Define the origin of the perspective attribute (3D space's vanishing point).
transform translate2D or3D transformation is applied to the element.
transform-origin Define the origin of the transformation of an element.
transform-style Specify how to3Render nested elements in D space.

Transition Attribute (Transition)

AttributeDescription
transition Define the transition between two states of an element.
transition-delay Specify when the transition effect should start.
transition-duration Specify the number of seconds or milliseconds the transition effect should take.
transition-property Specify the name of the CSS property to which the transition effect should be applied.
transition-timing-function Specify the speed curve of the transition effect.

Visual Format Attribute

AttributeDescription
displaySpecify how the element is displayed on the screen.
positionSpecify how to position the element.
topSpecify the position of the top edge of the positioned element.
rightSpecify the position of the right edge of the positioned element.
bottomSpecify the position of the bottom edge of the positioned element.
leftSpecify the position of the left edge of the positioned element.
floatSpecify whether a box should float.
clearSpecify the position of an element relative to the floating element.
z-indexSpecify the stacking or layering order of the positioned element.
overflowSpecify how the content of the overflow element box is handled.
overflow-x Specify how content overflow is managed when content exceeds the width of the element's content area.
overflow-y Specify how content overflow is managed when content exceeds the height of the element's content area.
resize Specify whether an element can be resized by the user.
clipDefine the clipping area.
visibilitySpecify whether an element is visible.
cursorSpecify the type of cursor.
box-shadow Apply one or more shadows to the box of an element.
box-sizing Change the default CSS box model.