CSS? ?? ??
?? ?? ??
CSS ??? ? ?? ?? ??, ? ???? ?? ??? ???? ?????.
selector { declaration1; declaration2; ... declarationN; }
???? ????? ???? ???? ? ??? HTML ?????. ? ??? ??? ??? ?????. ? ???? ?? ????. ??? ?? ???? ?????.
selector {property: value
?:
h1{ color:red; font-size:14px; }
??? 2? ??? ?? ????? ???? ?????. ? ?? ?? h1 ?? ??? ??? ??? ????? ???? ?? ??? 14??? ?????.
?? ?????? ? ??? ??? ?????.
??: ?? 1???? ? ?? ???? ???? ???.
p{font-family:"sans serif"}
?:
?? ??? ??? ??? ???? ???? index.html? MyCss.css?? ? ?? ??? ?????.
? ??? ?? ?? ??? ?????. ?? (??? ?? ??? ?????) : index.html
<!doctype html> <html> <head> <meta charset="UTF-8"> <title></title> <!--引外部資源 MyCss.css--> <link rel="stylesheet" href="MyCss.css" type="text/css"> </head> <body> <h1> PHP中文網(wǎng) </h1> </body> </html>
MyCss.css
h1{ color: red;font-size: 50px; }
h1 ?? ?? ??? ??? ????? ???? ?? ??? 50??? ?????.
Ctrl+s? ? ??? ???? index.html? ???? ?? ??? ?????.