CSS專題(一):Background

來源:互聯網
上載者:User

  CSS中的屬性Background,最常見不過了。可是你真的很瞭解嗎?

  Background表達背景,可用於各種元素。作用單一,表示元素的背景,不影響元素的布局。理解起來相對單純。background屬性可以直接書寫,順序很重要,依次是:

  background-color,

  background-image,

  background-repeat,

  background-attachment,

  background-position

  下面依次介紹各屬性的具體含義。

  background-color:背景色。背景色是相對於前景色彩而言的,其實在CSS中,前景色彩是由color控制的。background-color具體如下:

值: <color>|transparent|inherit
預設值: transparent(透明色)
應用於: 所有元素
繼承性:
計算值: 根據指定
   
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.