CSS 使用和基础
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <!-- 外部css --> <!-- rel 规定当前文档与被链接文档之间的关系 stylesheet 文档的外部样式表。 type 属性 规定被链接文档的 MIME 类型。 “text/css”,该类型描述样式表。 --> <link rel="stylesheet" type="text/css" href=""/> <!-- 内部css --> <style type="text/css"> h1{ /* 注释*/ } .class1{ } #id1{ } </style> </head> <body> <!-- 行内css --> <h1 style="color: black"></h1> <!-- 顺序 行内优先 --> </body> </html>