更換 檔頭背景圖片

2014072212:31

更換 檔頭背景圖片

 
 

 

 

 

 

進入管理後台→面板管理→自定樣式(css)


 找到 /*檔頭*/#banner語法標籤 ↓

/*檔頭*/
#banner{
 margin: 0px 0px 0px 0px;
 padding: 0px;
 height: 200px;
 
 }


把下面語法貼在{ }內↓

background-image:url(http://圖片網址);
background-attachment:fixed;
background-repeat:no-repeat;
background-position:top center;

變成↓

/*檔頭*/
#banner{
 margin: 0px 0px 0px 0px;
 padding: 0px;
 height: 200px;
 background-image:url(http://圖片網址);
 background-attachment:fixed;
 background-repeat:no-repeat;
 background-position:top center;}

 

說明:

background-image:url(背景圖網址) ←背景圖網址

background-attachment:fixed; ←背景圖不捲動  (scroll捲動)

background-repeat:repeat; ←重複排列填滿 (no-repeat不重複排列)


另外補充一些相關的語法↓


 

background-color: #00ff00; ←背景色 填入色碼

background-color: transparent; ←背景透明


background-position:  ←背景圖片位置,參數有↓
                        top left;     (左上)
                        top center;   (中上)
                        top right;    (右上)
                        center left;  (中左)
                        center center; (中中)
                        center right; (中右)
                        bottom left;  (左下)
                        bottom center; (中下)
                        bottom right; (右下)

 

 

   光光Blog首頁