css背景,背景位置,背景平鋪,背景拉伸,背景附著

2021-10-11 03:50:42 字數 623 閱讀 7226

css背景

css背景

背景顏色:background-color:black;

背景:background-imag:url(位址);

背景平鋪

不平鋪:background-repeat:no-repeat;

橫向平鋪:background-repeat: repeat-x;

縱向平鋪:background-repeat: repeat-y;

背景位置

background-position:0 0;

前面是x軸後面是y軸,x和y軸可以設定方位名詞也可以設定具體單位

如果是設定兩個方位名詞,順序是沒有關係

如果只設定一的值另乙個就是水平居中

背景附著:

背景固定:background-attachment: fixed;

背景滾動:background-attachment:scroll;

背景簡寫:背景顏色,背景位置,背景平鋪,背景附著,背景位置中間用空格隔開

background:#fff url(位置) no- repeat left top;

背景透明

background:rgba(0,0,0,0.3)

css背景位置

方位名詞 1.background color 背景顏色 2.background image 背景位址 3.background repeat 是否平鋪 repeat x 橫向平鋪 repeat y縱向平鋪 repeat 背景影象在橫向和縱向平鋪 no repeat 背景影象不平鋪 例 div 精...

android 背景平鋪

android中達到類似於windows桌面背景的平鋪的效果,定義乙個bitmap物件,在xml中和 中均可,設定其tilemode為repeat。在drawable資料夾下建立如下檔案tilebg.xml version 1.0 encoding utf 8 xmlns android andro...

css背景樣式css背景樣式

css背景樣式 css背景樣式 序號中文說明 標記語法 1背景顏色2背景 3背景重複 4背景固定 5背景定位 6背影樣式 1 背景顏色 background color 語法 說明 引數取值和顏色屬性一樣 注意 在 html當中,要為某個物件加上背景色只有一種辦法,那就是先做乙個 在 中設定完背景色...