CSS (Cascading Style Sheets) Chinese: Cascading Style Sheets
Example:
<style type="text/css">a{ color:red; text-align:center; font-size:24px; }</style>
HTML tag attributes use id to set the selector, and use "#" to select in CSS.
For example: A piece of text
The following is the method of selecting the representation.
Example:
<style type="text/css">#a{ color:red; text-align:center; font-size:24px; }</style>
If it is a class selector, it is written with a "." symbol, and the id selector The difference is that the class selector can be used in multiple HTML tags.
For example:a paragraph of text
a paragraph of text
Example:
<style type="text/css">.qqq{ color:red; text-align:center; font-size:24px; }</style>
The second way of writing represents the qqq element under the a tag
<style type="text/css">a.qqq{ color:red; text-align:center; font-size:24px; }</style>
Example:
<style type="text/css">a,b,c,d{ color:#FFFFFF; text-align:center; font-size:24px; }</style>
selects the li element under a in the instance. Descendant elements are selected with spaces. .
Example:
<style type="text/css">.a li{ color:red; }</style>
Child element is the same element under class, parent-child relationship. Use the greater than sign to represent
Example:
<style type="text/css">.a > .title{ color:#FF6300 }</style>
ID is unique and class is versatile.
To be continued.............