1.背景设置

  1. .box {
  2. width: 100px;
  3. height: 100px;
  4. background-color: red;
  5. background-image: url('./课件/images/icon1.png');
  6. /* 背景重复background-repeat: no-repeat | repeat-x | repeat-y */
  7. background-repeat: no-repeat;
  8. /* 设置背景位置 */
  9. background-position-x: center; 延x轴进行居中
  10. background-position-y: center; 延y轴进行居中
  11. background-attachment: fixed | scroll;
  12. fixed:背景图片不会随着页面的滚动而滚动。
  13. scroll: 背景图片随着页面的滚动而滚动,这是默认的。
  14. background-size:cover;
  15. 此时会保持图像的纵横比并将图像缩放成将完全覆盖背景定位区域的最小大小。
  16. 相当于background-size:100% 100%;
  17. background: color image repeat position
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <div class="box"></div>
  23. </body>

2.字体

font-size    大小
font-style: normal | italic 倾斜
font-weight: normal | bold | lighter    粗细

3.文本

line-height 行高
text-align:center
文本修饰text-decoration: underline下划线 | line-through删除线 | overline上划线
text-decoration:none

text-indent 文本缩进!!!
word-spacing 词语间距
letter-spacing 字母间距(中文用这个)

4.ul

ul{
    list-style:none 去除圆点
    list-style-type:square 变正方形
    list-style-type:circle 变圆形
    list-style-type:disc 实心圆
}

5.表格

<tr> 元素定义表格行,<th> 元素定义表头,<td> 元素定义表格单元。

border-collapse:collapse 边框折叠
//设置表格的边框被折叠成一个单一的边框

//在th,td设置这个两个属性
colspan:[1/2/3/...]    // 表示向右合并单元格。
rowspan:[1/2/3/...]    // 表示向下合并单元格,

6.继承