1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 8 <title>Document</title> 9 <style> 10 h1 { 11 /* hex */ 12 color: #000000; 13 /* hex 缩写->仅限于前三位值和后三位相同. */ 14 color: #000; 15 /* color-name */ 16 color: black; 17 /* rgb */ 18 color: rgb(0,0,0); 19 /* rgba */ 20 color: rgba(0,0,0,1); 21 /* inherit(默认从父类继承字体颜色) */ 22 color: inherit; 23 } 24 </style> 25 </head> 26 27 <body> 28 <h1>00004</h1> 29 </body> 30 31 </html>