Five types of editing properties commonly used in CSS

Source: Internet
Author: User

CSS Font Properties

Property Description
Font Shorthand property. The function is to set all the font-oriented properties in a single declaration.
font-family set the font family.
Font-size sets the size of the font.
Font-style set the font style.
Font-variant displays text in either a small uppercase font or a normal font.
Font-weight sets the weight of the font.

CSS Text Properties

Property Description
Color Set Text colors
Direction sets the text orientation.
Line-height set the row height.
Letter-spacing set the character spacing.
Text-align aligns the text in the element.
Text-decoration add adornments to text.
Text-indent indents the first line of text in the element.
Text-transform the letters in the control element.
Unicode-bidi sets the text orientation.
White-space sets how whitespace is handled in the element.
Word-spacing set the word spacing.

CSS Border Properties

Property Description
The border shorthand property, which is used to set properties on four sides in a declaration.
The Border-style is used to style all borders of an element, or to individually set border styles for each edge.
The Border-width shorthand property, which is used to set the width for all the borders of an element, or to set the width individually for each edge border.
The Border-color shorthand property, sets the color of the visible part of all the borders of an element, or sets a color for 4 edges.
Border-bottom Shorthand property for setting all properties of the bottom border to a declaration
The Border-left shorthand property, which is used to set all properties of the left border to a declaration.
The Border-right shorthand property, which is used to set all properties of the right border to a declaration.
The Border-top shorthand property, which is used to set all properties of the top border to a declaration.

CSS Listing Properties (list)

Property Description
The List-style shorthand property. Used to set all properties used for the list in a declaration.
List-style-image sets the image to the list item flag.
List-style-position sets the position of the list item flags in the list.
List-style-type sets the type of the list item flag.

CSS Background Properties

Property Description
The background shorthand property, which is to set the Background property in a declaration.
Background-attachment whether the background image is fixed or scrolls along with the rest of the page.
Background-color sets the background color of the element.
Background-image set the image to the background.
Background-position sets the starting position of the background image.
Background-repeat sets whether and how the background image repeats.

Css
    • CSS full name: cascading Style Sheets.
    • Cascading style sheets, cascading style sheets.
    • is a computer language used to represent HTML file styles.
Loading of CSS
    1. Browser Default Style
    2. User-defined Styles
    3. Author Custom styles
Defining styles
    1. Use the Style property in the element start tag to add a style (inline)
    2. Specifying styles with a style tag in the head tag (inline)
    3. Using the link external link in the head tag a CSS file (external)
CSS grammar rules tag/tag Selector

{
Statement
Attribute: property value;
}

Pseudo class Selector

A:link Initial
After a:visited access
A:hover mouse move in | | Mouse hover
A:active when clicked-Instant
Li:nth-last (reciprocal)-chid (odd odd; even even; 3n+1 for loops)

Descendant Selector

P Space Span

Child Selector

P>span

and set Selector

H1,h2,h3,span,p,li,box1 ...

Wildcard characters *

*{margin: margin; padding: inner margin;}

Pseudo element Selector

Div:first-letter (line): font-size:30px;

Selector weights

! important>style>id>class> element >*

Cascade mechanism

Through multiple channels, the style attributes of different direct action elements, elements of the same judgment weight, the same weight, before the cover, weight difference, with the right to the important

Inherited

The child style is not explicitly declared, inherited from the parent, but the child can declare the style individually and does not affect the parent; the style of the type of text is inherited

Five types of editing properties commonly used in CSS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.