רקע הדף יראה בסטייל הבא:
בחלק ההד
<STYLE TYPE="text/css">
<!--
BODY {background-image:url(bg/DG033.jpg); background-repeat:repeat-y}
-->
</STYLE>
|
1 1 1
|
לרקעים בטבלה, רקע לצד:ממש כמו לדף שלם: .table {background-image:url(images/fruit.gif); background-repeat:repeat-y} |
|
1 1 1
|
לרקע עליון.. פס בלבד בגובה התמונה: |
|
1 1 1
|
לרקע שאינו חוזר.. כלאמר יהיה תלוי בגודל התמונה: .table3 {background-image:url(images/fruit.gif); background-repeat:no-repeat } |
| טיפ חשוב נוסף הוא רקע ה"נמץח" לכל גודל הדף, גם אם התמונה קטנה.. נסו
להכניס את הסקריפט הבא לסוף הדף שלכם.. רק זכרו להחליף את שם התמונה... <script language="JavaScript"> function makeIm() { NS4=(document.layers); IE4=(document.all); scaleWidth = true; scaleHeight = true; imSRC = "images/fruit.gif"; if (NS4) { origWidth = innerWidth; origHeight = innerHeight;} function reDo() { if (innerWidth != origWidth || innerHeight != origHeight) location.reload();} if (NS4) onresize = reDo; if (IE4) onresize = reDoIE; function reDoIE(){ imBG.width = document.body.clientWidth; imBG.height = document.body.clientHeight;} winWid = (NS4) ? innerWidth : document.body.clientWidth; winHgt = (NS4) ? innerHeight : document.body.clientHeight; imStr = "<div id=elBGim" + " style='position:absolute;left:0;top:0;z-index:-1'>" + "<img name='imBG' border='0' src="+imSRC; if (scaleWidth) imStr += " width="+winWid; if (scaleHeight) imStr += " height="+winHgt; imStr += "></div>"; document.write(imStr);} makeIm(); </script> |