1、背景圖片語法
background-image:url() 引入背景圖片
background-repeat:no-repeat 設(shè)置背景圖片是否重復(fù)平鋪
屬性值:
repeat: 背景圖像將向垂直和水平方向重復(fù)。這是默認(rèn)
repeat-x: 只有水平位置會(huì)重復(fù)背景圖像
repeat-y: 只有垂直位置會(huì)重復(fù)背景圖像
no-repeat: background-image不會(huì)重復(fù)
inherit: 指定background-repea屬性設(shè)置應(yīng)該從父元素繼承
background-color: 指定要使用的背景顏色
background-position : 指定背景圖像的位置
background-size : 指定背景圖片的大小
background-origin: 指定背景圖像的定位區(qū)域
background-clip:指定背景圖像的繪畫區(qū)域
background-attachment: 設(shè)置背景圖像是否固定或者隨著頁面的其余部分滾動(dòng)
background-image: 指定要使用的一個(gè)或多個(gè)背景圖像
background-position:left top 設(shè)置圖片的css背景定位,left代表靠左,top代表靠上
簡寫背景圖片語法:
background:bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit;