liuyanxia

CSS2 中有5个主要的背景(background)属性,它们是:

background-color: 指定填充背景的颜色。
background-image: 引用图片作为背景。
background-position: 指定元素背景图片的位置。
background-repeat: 决定是否重复背景图片。
background-attachment: 决定背景图是否随页面滚动。

这些属性可以全部合并为一个缩写属性: background。需要注意的一个要点是背景占据元素的所有内容区域,包括 padding 和 border,但是不包括元素的 margin。它在 Firefox, Safari ,Opera 以及 IE8 中工作正常,但是 IE6 和 IE7 中,background 没把 border 计算在内。

分类:

技术点:

相关文章:

  • 2021-06-22
  • 2021-06-08
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
  • 2021-04-18
  • 2021-12-10
  • 2021-10-22
猜你喜欢
  • 2021-05-27
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-01-24
  • 2021-10-15
  • 2021-06-23
相关资源
相似解决方案