分享

CSS 背景属性

 hailin_cqx 2007-08-07

CSS背景属性

CSS背景元素允许你控制元素的背景颜色,将图像设置为背景,垂直或水平低重复背景图像,并且在网页上定位背景图像。

浏览器支持IE: Internet Explorer, F: Firefox, N: Netscape。

W3C:“W3C”列的数字显示出属性背景由哪个CSS标准定义(CSS1还是CSS2)。

属性 描述 IE F N W3C
background 简写属性,作用是将背景属性设置在一个声明中。
  • background-color
  • background-image
  • background-repeat
  • background-attachment
  • background-position
4 1 6 1
background-attachment 设置是否背景图像是固定的或虽页面其余部分滚动。
  • scroll
  • fixed
  • 4 1 6 1
    background-color 设置元素的背景颜色。
    • color-rgb
    • color-hex
    • color-name
    • transparent
    4 1 4 1
    background-image 将图像设置为背景。
    • url
    • none
    4 1 4 1
    background-position 设置背景图像的起始位置。
    • top left
    • top center
    • top right
    • center left
    • center center
    • center right
    • bottom left
    • bottom center
    • bottom right
    • x-% y-%
    • x-pos y-pos
    4 1 6 1
    background-repeat 设置背景图像是否及如何重复。
    • repeat
    • repeat-x
    • repeat-y
    • no-repea

      本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
      转藏 分享 献花(0

      0条评论

      发表

      请遵守用户 评论公约

      类似文章 更多