close

~將背景圖固定語法分享~


許多格友很好奇, 如何將背景圖案固定, 今天就將此語法分享給大家~


 


先進入面版設定自訂樣式, 你將會看到css語法, 然後找尋body加入background-attachment: fixed;}


body {
background-image: url(
http://xxxxx.gif
);
background-repeat:no-repeat ;
background-position :0% 100%;
background-attachment: fixed;}


 


紅色部分說明:
backgroud-position: 0% 0%; 左邊上方
backgroud-position: 0% 50%; 左邊中間
backgroud-position: 50% 0%; 中間上方
backgroud-position: 50% 50%; 正中間
backgroud-position:100% 0%; 右邊上方
backgroud-position: 0% 100%; 左邊下方
backgroud-position: 100% 50%; 右邊中間
backgroud-position: 50% 100%; 中間下方
backgroud-position: 100% 100%; 右邊下方
ps:當然百分比可以任意調動,不一定上面的~


 這樣背景就可以固定, 請大家試著做看看, 網頁製作會讓你增加許多樂趣呢!....竭誠歡迎你一起加入探索行列吧!


 


以下是我的css檔, 僅供參考, 因為你的css檔未必與我相同, 但你只要加入語法, 就可以有相同的效果!


 


/*Article content module*/
.yblogcnt .blgtitlebar {margin-bottom:10px;zoom:1;}
.yblogcnt .blgtitlebar h2 {font-family:標楷體;padding-left:20px;font-size:130%;font-weight:bold;background:url(http://標題圖示位址
) no-repeat;padding-left:32px;}
 /*Background*/ body {cursor:url(http://滑鼠圖示位址);
    background:#ffccff;background-attachment: fixed;}


 


格友們若網頁改造成功, 別忘了回報紫蝶, 讓我分享你的喜樂!

arrow
arrow
    全站熱搜

    lavendersky168 發表在 痞客邦 留言(9) 人氣()