HTML CSS Styles

Source: Internet
Author: User

CSS style:
1. The Style property of the label
2. Write style in the Style tab in the head
-ID Selection Area
#i1 {

height:48px;
}

-Class selector ******

Name
...
}

< label class= ' name ' > </tag >

-Tag Selector
div{
...
}


All div settings on this style

-level selector (space) ******
. C1. C2 div{

}
-Combo Selector (comma) ******
#c1,. c2,div{

}

-Property selector ******
Filter the selected labels again by attributes
. c1[n= ' Alex ']{width:100px; height:200px;}

Ps:
-priority, style first on label, write order, nearest principle

2.5 CSS styles can also be written in separate files
<link rel= "stylesheet" href= "Commons.css"/>

3. Comments
/* */

4. Border
-width, style, color (border:4px dotted red;)
-Border-left

5.
Height, percentage of altitude
width, breadth pixels, percent
Text-align:ceter, centered horizontally
Line-height, vertical direction according to label height
Color, font colors
Font-size, Font size
Font-weight Font Bold

6, float

<div style= "Clear:both;" ></div>

7. Display
Display:none; --Let the label disappear
Display:inline;
Display:block;
Display:inline-block;
With inline, the default number of its own how much
With block, you can set the height, width, padding margin
******
Inline Tags: Unable to set height, width, padding margin
Block-level Tags: set height, width, padding margin


8. Padding margin (0,auto)

HTML CSS Styles

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.