Css classification attribute selector and css Selector

Source: Internet
Author: User

Css classification attribute selector and css Selector

CssSmall Tool for page beautification of stacked Style Sheets

Category:

Inline (in-row) is displayed in the form of attributes inside the tag. The attribute name is style.

The embedded head label is displayed as a label, and the label name is style.

Add the link label to the external head label to introduce the external file *. css

<Link rel = "stylesheet" type = "text/css" href = "file: // D |/SSs/job/3.12/ .css"/>
Link label

Insert icon (add icon, path must be absolute path)

<link rel="shortcut icon" href="xxx.ico" type="image/x-icon"/>
Icon

Selector:

Used to find elements and use styles on tags.

Tag selector. div {}

Id selector # id {}

Class selector. class {}

Parallel (plus comma) selector 1, selector 2

Parent and Child (with spaces) parent selector child Selector

* {} Full page

Attribute:

Text:

Text-decoration text modifier (underline or something)

Text-indent

Text-shadow 1px (horizontal shadow position) 1px (vertical) 1px (fuzzy distance) # (shadow color)

Bold text-weight font

Size of a word in the em table

Background:

Background-position: property defines the position of the image in the div, which can be left or right up or down by two values.

Bg-position

    

Background-size proportional scaling of image size

Background: the size of the tiled position of the color image.

 

 

Summary:

1. The text-indent attribute can only be used on block labels. Row labels such as span cannot be used.

Solution: add the display: inline-block attribute to span and change it to the intra-row block label.

2. The big div sets a small div. If the parent div does not have a width or height, it will change as the position of the child div moves.

For example, if the margin float attribute is written in the sub-div, the parent div will also move.

Solution: Set the border or define the width and height for the parent div.

3. Change the

<Hr style = "background-color: # ECECEC; border: none; height: 1px;"/>

Deselect the border and set the background color to high.

Related Article

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.