Preface: This lesson mainly tells about CSS related content.
emphasis : 1.css (cascading style Sheet) overlay style sheet, the appearance of Web pages, is used to control the style of the Web page and allows to separate the style information from the content of the Web page a markup language.
Several ways to do 2.css:
(1) Inline style: Write directly in the HTML tag and add "style" after the tag. <div style= "height:100px" ></DIV>, where height is the property of the CSS, and 100px is its property value.
(2) Inline style: It involves the concept of selectors, there are three kinds of selectors: Tag Selector, class selector, ID selector, respectively:
Style styles are written under the title tag
<style type= "Text/css" >
div{width:100px}
</style>
In the example above, the div is styled, and all the Div uses this style, called the tag Selector.
There is also a selector for the class selector, such as
<style type= "Text/css" >
. C1{color: #F00}
</style>
<div class= "C1" > Hello </div>
The class selector has a higher precedence than the tag Selector.
There is also a selector called the ID selector, such as
<style type = "Text/css" >
#d1 {color: #F00}
</style>
<div id= "D1" > Hello </div>
Selector priority order: ID selector >class selector > tag Selector. The ID cannot have multiple or duplicate IDs.
(3) Link style: This is the most used style, create a separate CSS file to represent the style, use the time to call, create a CSS folder to include different styles. Different page files can correspond to different CSS files, preferably corresponding to the same name, such as A.HTML,A.CSS, public style can be named Base.css, so easy to maintain. It embodies the low coupling of the program.
(4) Import style: This style is seldom used, it is not good to load the style sheet until the whole HTML content has been loaded.
<style>
@import URL (1.css)
</style>
The choice of various styles adopted the nearest principle, four styles have no priority relationship.
3.CSS Annotation:/* */
4. CSS inheritance: Child tags inherit all the styles of the parent tag and can modify themselves without affecting the parent tag.
5.css text effect: font-family (font, need to be computer installed fonts, Microsoft Ya Black effect is good); font-size (font size); color (font color); font-weight (font weight); Text-decoration: Underline (underline); Text-decoration:overline (dash); Text-decoration:line-through (strikethrough); Text-transform: Capitalize (capitalize the first letter of the word); Text-transform:uppercase (all uppercase words); Text-transform:lowercase (all lowercase words); letter-spacing (letter spacing) Text-align (text alignment, Left,right,center), line-height (vertically centered, so the property value is equal to the height of the text box).
6. Color-fetching utility: Fscapture.
7. First assignment.
PostScript :
ASP. NET Dynamic website production (2)--css