CSS (cascading style Sheets, cascading style sheets), control the appearance of the page style, the role is to beautify the HTML page.
First, the basic concept of style sheets
1. Classification of Style sheets
(1) Inline style sheet -----placed in the opening tag of the element, only the current element, and the HTML joint display, the control is accurate, but the reusability is poor, more redundant.
Cases:
<input name= "txt" style= "border:0px; border-bottom:1px solid black; "type=" text "/>
Cases:
Show Results:
(2) Inline style sheet -----As a separate area, embedded in the Web page, can work on the entire page, must be written in between
Cases:
<meta http-equiv= "Content-type" content= "text/html; charset=utf-8"/><title> Untitled document </title> <style type= "Text/css" >input{border:5px; <style is an inline style sheet between color: #3F6; border-bottom:3px solid Red;} </style><body><input type= "text" name= "A1" id= "A1" ><input type = "Buttom" name= "A2" id= "A2" value= "button" ><p> Hello </p> <!--input other than unchanged, no effect---< /body>
Show Results:
(3) The external style sheet -----placed in a separate. CSS style sheet file, you can work on the entire Web site.
mode of operation: create a new one. CSS file, which is used to store the style sheet and call the style sheet in HTML, to right-click in the HTML-->css style sheet and attach the style sheet. Style sheets are generally connected by link.
1, the definition of the external style sheet.
Cases:
" Utf-8 " ; /* */input{border:5px; Color: #3F6; border-bottom:3px solid red;}
2. Calls to external style sheets.
Cases:
"Content-type"Content="text/html; Charset=utf-8"/><title> Untitled Document </title><link href="file:///E|/page/untitled-2.css"Rel="stylesheet"Type="Text/css"/><!--link-connected external style sheet-"text"Name="A1"Id="A1"><input type="Buttom"Name="A2"Id="A2"Value="Button"><p> Hello </p> </body>
Show Results:
CSS style sheet------Chapter One: Basic concepts of style sheets