Home > Article > Web Front-end > Common properties of CSS1 and CSS2
This time I will bring you the common properties of CSS1 and CSS2. What are the precautions for using the common properties of CSS1 and CSS2? Here are practical cases, let’s take a look.
background Set all background properties in one statement.
background-attachment Set whether the background image is fixed or scrolls with the rest of the page.
background-color Set the background color of the element.
background-image Set the background image of the element.
background-position Set the starting position of the background image.
background-repeat Set whether and how to repeat the background image.
border Set all border properties in one statement.
border-bottom Set all bottom border properties in one statement.
border-bottom-color Set the color of the bottom border.
border-bottom-style Set the style of the bottom border.
border-bottom-width Set the width of the bottom border.
border-color Set the color of the four borders.
border-left Set all left border properties in one statement.
border-left-color Set the color of the left border.
border-left-style Set the style of the left border.
border-left-width Set the width of the left border.
border-right Set all right border properties in one statement.
border-right-color Set the color of the right border.
border-right-style Set the style of the right border.
border-right-width Set the width of the right border.
border-style Set the style of the four borders.
border-top Set all top border properties in one statement.
border-top-color Set the color of the top border.
border-top-style Set the style of the top border.
border-top-width Set the width of the top border.
border-width Set the width of the four borders.
outline Set all outline properties in one statement.
outline-color Set the color of the outline.
outline-style Set the style of the outline.
outline-width Set the width of the outline.
height Set the height of the element.
max-height Set the maximum height of the element.
max-width Set the maximum width of the element.
min-height Set the minimum height of the element.
min-width Set the minimum width of the element.
width Set the width of the element.
FONT Set all font attributes in one statement.
font-family Specifies the font family of the text.
font-size Specifies the font size of the text.
font-size-adjust Specifies the aspect value for the element.
font-stretch Shrink or stretch the current font family.
font-style Specifies the font style of the text.
font-variant Specifies whether to display text in small caps font.
font-weight specifies the thickness of the font.
content is used with :before and :after pseudo-elements to insert generated content.
counter-increment Increments or decrements one or more counters.
counter-reset Create or reset one or more counters.
quotes Set the quote type of nested quotes.
list-style Set all list properties in one statement.
list-style-image Set the image as the list item mark.
list-style-position Set the placement position of the list item mark.
list-style-type Set the type of list item tag.
margin Set all margin properties in one declaration.
margin-bottom Set the bottom margin of the element.
margin-left Set the left margin of the element.
margin-right Set the right margin of the element.
margin-top Set the top margin of the element.
padding Set all padding properties in one statement.
padding-bottom Set the bottom padding of the element.
padding-left Sets the left padding of the element.
padding-right Set the right padding of the element.
padding-top Set the top padding of the element.
bottom Set the offset between the bottom margin boundary of the positioned element and the bottom boundary of its containing block.
clear Specifies which side of the element does not allow other floating elements.
clip clips an absolutely positioned element.
cursor Specifies the type (shape) of the cursor to be displayed.
display Specifies the type of box that the element should generate.
float Specifies whether the box should float.
left Set the offset between the left margin boundary of the positioned element and the left boundary of its containing block.
overflow Specifies what happens when content overflows the element box.
position specifies the positioning type of the element.
right Set the offset between the right margin boundary of the positioned element and the right boundary of its containing block.
top Set the offset between the top margin boundary of the positioned element and the upper boundary of its containing block.
vertical-align Set the vertical alignment of the element.
visibility Specifies whether the element is visible.
z-index Set the stacking order of elements.
orphans Set the minimum number of lines that must remain at the bottom of the page when pagination occurs inside the element.
page-break-after Sets the paging behavior after the element.
page-break-before Set the paging behavior before the element.
page-break-inside Set the paging behavior inside the element.
Widows Settings must be retained at the minimum number of rows on the top of the page when the pagination occurs in the element.
border-collapse Specifies whether to merge table borders.
border-spacing Specifies the distance between adjacent cell borders.
caption-side Specifies the position of the table title.
empty-cells Specifies whether to display borders and backgrounds on empty cells in the table.
table-layout Set the layout algorithm used for tables.
color Set the color of the text.
direction Specifies the direction/writing direction of the text.
letter-spacing Set character spacing.
line-height Set the line height.
text-align Specifies the horizontal alignment of text.
text-decoration Specifies the decorative effect added to the text.
text-indent specifies the indentation of the first line of the text block.
text-shadow Specifies the shadow effect added to text.
text-transform Control the case of text.
unicode-bidi Set the text direction.
white-space specifies how to handle whitespace in elements.
word-spacing Set word spacing.
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
JavaScript array-string-mathematical function
The above is the detailed content of Common properties of CSS1 and CSS2. For more information, please follow other related articles on the PHP Chinese website!