css文本外观属性

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>春天</title>
  7. <style type="text/css">
  8. div{
  9. font-family:"宋体";//字体
  10. font-size:12px;
  11. color:#0C3;//字体颜色,这是用十六进制的表示,还可以用单词表示;
  12. text-indent:2em;//首行缩进两个字符;
  13. }
  14. h2{
  15. font-size:16px;
  16. color:red;//颜色为红色;
  17. text-align:center;//居中;
  18. text-decoration:overline;//上划线;
  19. }                                
  20. span{color:red;}
  21. </style>
  22. </head>
  23. <body>
  24. <h2>春天</h2>
  25. <div><span>春季</span>,地球的北半球开始倾向太阳,受到越来越多的太阳光直射,因而气温开始升高。随着冰雪消融,河流水位上涨。<span>春季</span>植物开始发芽生长,许多鲜花开放。冬眠的动物苏醒,许多以卵过冬的动物孵化,鸟类开始迁徙,离开越冬地向繁殖地进发。许多动物在这段时间里发情,因此中国也将<span>春季</span>称为“万物复苏”的季节。<span>春季</span>气温和生物界的变化对人的心理和生理也有影响。</div>
  26. </body>
  27. </html>

猜你喜欢

转载自blog.csdn.net/qq_41404557/article/details/83868679