每日总结

今天继续学习了css里的背景

background-color 设置颜色作为对象背景颜色
background-image 设置图片作为背景图片
background-repeat 设置背景平铺重复方向
background-attachment 设置或检索背景图像是随对象内容滚动还是固定的。
background-position 设置或检索对象的背景图像位置。

Background背景样式的值是复合属性值组合,也就是背景单词的值可以跟多个属性值,值与值之间使用一个空格间隔链接上即可。
如:
background:#000 url(图片地址) no-repeat left top

Css background背景作用:
1、设置纯色背景。背景background可以设置对象纯色的背景颜色,
2、设置图为背景。可以设置对象背景为图片,如果背景是图片可以让图片重复平铺横铺,或将图片作为对象背景固定在对象任何位置。

<table bgcolor="#996600"> 
<tr> 
<td background="http://www.divcss5.com/img/css-logo.gif"
 width="130" height="100"> </td> 
</tr> 
</table> 

  

原文地址:https://www.cnblogs.com/wrljzb/p/14910075.html