我有一個jquery腳本,允許改變身體的背景自動調整身體背景圖像瀏覽器窗口?
我想有縮放到瀏覽器窗口大小 身體的背景圖像有一個叫http://www.buildinternet.com/project/supersized/腳本,但我不能夠利用該腳本的縮放,因爲它會影響類IMG不是背景-IMG
任何想法
<script type="text/javascript">
$(document).ready(function() {
$("#BGSelector a").click(function() {
var imgLink = $("img", this).attr("src");
$.cookie("html_img", "" + imgLink + "", { path: '', expires: 7 });
var imgCookieLink = $.cookie("html_img");
$("body").css("background", "url('" + imgCookieLink + "') no-repeat fixed center top #343837");
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
var imgCookieLink = $.cookie("html_img");
$("body").css("background", "url('" + imgCookieLink + "') no-repeat fixed center top #343837");
});
</script>
是的,我知道這條路線,這就是一個大家都在用,但沒有人有在S解決方案背景IMG,主要是因爲背景類是CSS不具有大小真的 ,但我真的想將調整身體背景的方式 – vache 2009-07-06 01:49:27