CSS中的属性Background,最常见不过了。可是你真的很了解吗?

  Background表达背景,可用于各种元素。作用单一,表示元素的背景,不影响元素的布局。理解起来相对单纯。background属性可以直接书写,顺序很重要,依次是:

  background-color,

  background-image,

  background-repeat,

  background-attachment,

  background-position

  下面依次介绍各属性的具体含义。

  background-color:背景色。背景色是相对于前景色而言的,其实在CSS中,前景色是由color控制的。background-color具体如下:

值: <color>|transparent|inherit
默认值: transparent(透明色)
应用于: 所有元素
继承性:
计算值: 根据指定
   

相关文章:

  • 2021-12-06
  • 2021-06-21
  • 2021-06-29
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2022-01-24
  • 2022-12-23
  • 2021-09-11
  • 2021-10-04
  • 2021-05-21
  • 2022-12-23
相关资源
相似解决方案