CSS (cascading style Sheets) Chinese: Cascading style sheet set to syntax: <style type= "" > </style>
Instance:
<style type= "Text/css" >a{ color:red; Text-align:Center; font-size:24px; }</style>
Selector ID Selector
The HTML tag attribute is set by the ID of the selector, in the CSS is "#" to select.
such as: <a id= "A" > a text </a>
The following is the method for the selected representation.
Instance:
<style type= "Text/css" > #a { color:red; text-align:Center; font-size:24px; } </style>
Class Selector
If you are using the class selector, the notation is "." Number, unlike the ID selector, the class selector can be used in multiple HTML tags.
such as: <a class= "QQQ" > a text </a>
<p class= "QQQ" > A paragraph of text </p>
Instance:
<style type= "Text/css" >.QQQ { color:red; text-align:Center; font-size:24px; } </style>
The second type of notation
<style type= "Text/css" >A.QQQ { color:red; text-align:Center; font-size:24px; } </style>
Multi-Element Selector
Instance:
<style type= "Text/css" >a,b,c,d { color:#FFFFFF; text-align:Center; font-size:24px; } </style>
Descendant element Selector
Select the Li element under a in the instance, and the descendant elements are selected with a space.
Instance:
<style type= "text/css" >.a Li { color:red; } </style>
Child element Selector
The child element is the same element under class, the parent-child relationship. denoted by greater than sign
Instance:
<style type= "Text/css" >.a >. Title { color:#FF6300 }</style>
Summarize
ID is unique and class is multi-purpose.
Cond.............
CSS language Notes < a >