|
โค้ดบีจี
ใส่ bg แบบ tile <style>body{background-image:url(XXX);} </style>
ใส่ bg โดยใช้สี <style>body{background:color code}></style>
ใส่ bg โดยไล่เฉดสี (gradient) <body style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='color code 1', startColorstr='color code 2', gradienttype=0);" > gradienttype 0 ไล่สีตามแนวนอน gradienttype 1 ไล่สีตามแนวตั้ง
ใส่บีจีทั้งหน้า <STYLE type="text/css"><!--BODY{background-image : url(ที่อยู่รูปภาพ);background-attachment : fixed;}-- > </STYLE>
โค๊ด บีจีอยู่กับที่ไม่เลื่อนตาม scrollbar <style>body{background-attachment: fixed;background-image:url(xxx);} </style>
ใส่บีจีจากภาพเล็กๆหลายภาพเรียงกัน <style>body{background-attachment: fixed;background-image:url(xxx);} </style>
โค๊ด สำหรับทำบีจีแจก (ทำให้ทดลองคลิกดูลายบีจีได้เลย) <a href=javascript:document.body.style.backgroundImage='url("xxx")';document.close();><IMG src="urlภาพbg แบบกำหนดขนาดเล็ก" width="200"</a>
โค๊ดใส่ภาพที่จะให้เพื่อนๆ ทดลองคลิกดูได้ .. ใช้โค๊ดนี้ ภาพมุมซ้าย-ขวา ปรับขนาดของภาพได้จาก width และ height <a href=javascript:document.body.style.backgroundImage='url("xxx")';document.close();><IMG src="xxx" width="150" height="150" border="0"></a>
Code ให้ภาพอยู่ - กลางบล็อก <style>Body {background-image:url("xxx");background-position:center;background-repeat: no-repeat;background-attachment: fixed;background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ - มุมซ้ายบน <style>Body {background-image:url("xxx");background-position: left top;background-repeat: no-repeat;background-attachment: fixed;background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ - มุมซ้ายกลาง <style>Body {background-image:url("xxx");background-position: left center;background-repeat: no-repeat;background-attachment: fixed;background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ - มุมซ้ายล่าง <style>Body {background-image:url("xxx");background-position: left bottom;background-repeat: no-repeat;background-attachment: fixed;background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ - มุมขวาบน <style>Body {background-image:url("xxx");background-position: right top;background-repeat: no-repeat;background-attachment: fixed;background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ - มุมขวาล่าง <style>Body {background-image:url("xxx");background-position: right bottom;background-repeat: no-repeat;background-attachment: fixed;background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ - เรียงแนวยาวด้านบน <style>body {background-image:url("xxx") ;background-repeat : repeat-x ;background-attachment : fixed; background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ - เรียงแนวยาวด้านล่าง <style>body {background-image:url("xxx") ; background-position:bottom ;background-repeat : repeat-x;background-attachment: fixed;background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ - เรียงแนวตั้งด้านซ้าย <style>body {background-image:url("xxx") ;background-position:left ;background-repeat:repeat-y ;background-attachment : fixed;background-color: "สีพื้น";}</style>
Code ให้ภาพอยู่ เรียงแนวตั้งด้านขวา <STYLE type="text/css"> <!--BODY{background-image : url(xxx);background-repeat : repeat-y;background-position : right;background-attachment : fixed;}-- > </style>
|
Create Date : 16 กันยายน 2554 |
|
0 comments |
Last Update : 16 กันยายน 2554 21:27:12 น. |
Counter : 1079 Pageviews. |
|
|
|
|
|
|
|
|