css字体的属性

1 <!DOCTYPE html>
  2 <html lang="en">
  3 <head>   
  4     <meta charset="UTF-8">
  5     <title></title>
  6     <style>
  7     div {
  8         border:1px red solid;
  9         /* 
 10         font可以设置字体的所有属性
 11             语法:
 12                 font:字体大小/行高 字体族
 13                 行高 可以省略不写,如果不写使用默认值
 14          
 15          */
 16          
 17         /*font-size:50px;                                          
 18         font-family:serif;
 19         font:50px serif;
 20         line-hight:200px;
 21         font-weight:字重,字体的加粗
 22             -可选值:
 23                 -nomal默认值,不进行加粗
 24                 -bold加粗
 25         font-style字体的风格
 26             -可选值
 27                 -nomal
 28                 -italic斜体
 29         font-weight:bold;
 30         font-style:italic;
 31         以上字体的属性可以简写为:*/
 32         font:bold italic 50px/2 serif;
 33          
 34     }    
 35          
 36     </style>
 37 </head>  
 38 <body>   
 39     <div>Linux基础知识</div>
 40 </body>  
 41 </html>  
~                                                                      
~                                                                      
~                                                                      
~                                                                      
~                                                
笨鸟先飞
原文地址:https://www.cnblogs.com/zoutingrong/p/14002132.html