我想爲我的遊戲記分板添加幾張圖片作爲使用jquery的背景。如何在html頁面上使用jquery腳本添加背景圖片
例如。 header.jpg爲header,footer.jpg爲footer和body.jpg爲body。
我在jquery中創建了一個小遊戲。
目前,我的遊戲記分牌只顯示幾條短信。我想在一些背景圖片上展示他們。
下面是我用來顯示短信的代碼。請幫助我,以便我可以在其上顯示背景圖像。
代碼:
......................
......................
else {
goldenGoal = false;
$("#message1").html("You Lose");
$("#message1").css("color", "red");
$("#message1").css("size", "190px");
$("#play").html("Play Level Again");
$("#lgoals").html(0);
$("#vgoals").html(0);
stats.loses++;
//level = 1;
//fps = 50;
//difficulty = 0.2;
}
..................
..................
嘗試先對您的問題進行搜索:http://stackoverflow.com/a/1787976/1538708 – adamb
@adamb我第一次嘗試。我找不到它。所以最後我在這裏質疑它。 –