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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...
