พอดีมีคนหลังไมค์มาถามเรื่องการใส่ BG 2 ชั้น คือ BG ชั้นในและชั้นนอกค่ะ ไหนๆ ก็จะตอบแล้ว ก็เลยเขียนบล็อกใหม่เลยดีกว่า เผื่อว่าจะเป็นประโยชน์บ้างสำหรับคนที่ยังไม่ทราบวิธีการทำค่ะ
วิธีการทำ BG 2 ชั้นนั้นนะค่ะ จะมีการกำหนดโค้ดอยู่ 2 ส่วนค่ะ คือ
1. โค้ดที่วางในช่อง Script Area จะเป็น BG ชั้นนอกสุด
2. โค้ดที่วางในช่อง Slogan ค่ะ ส่วนนี้จะเป็นส่วนของ BG ชั้นในและภาพหัวบล็อกค่ะ
ส่วนที่วางที่ช่อง Script Area ใช้โค้ดนี้สำหรับใส่ BG พื้นหลังค่ะ
<style>body{background-attachment: fixed;background-image:url(…..url ภาพพื้นหลังค่ะ......);} </style> |
หมายเหตุ – สำหรับคนที่ได้กำหนดโค้ดให้ไดอารี่ใส ต้องลบโค้ดส่วนนี้ออกด้วยนะค่ะ เพราะเวลาที่ใส่ BG ชั้นใน จะมองไม่เห็น
ส่วนที่วางที่ช่อง Slogan ใช้โค้ดนี้สำหรับกำหนดภาพพื้นหลังชั้นในและภาพหัวบล็อกค่ะ
<table bordercolorlight="#ffffff" bordercolordark=" #e7e0c9 " align="center" background="none" border="1" cellpadding="0" cellspacing="0" width="65%"><tbody><tr><td>
<table style="border-collapse: collapse;" bordercolorlight="#ffffff" bordercolordark="#e7e0c9" align="center" background="..url ภาพพื้นหลังด้านใน..." border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><table style="background: ;";cellpadding="0" cellspacing="0" align="center"><tr><td><table style="background: ;";cellpadding="0" cellspacing="0" align="center"><tr><td><center>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center"> <tr> <td width="ความกว้าง" height="ความสูงค่ะ" <img border="0" src="...url ภาพหัวบล็อกค่ะ.... " </tr></table>
|
ตัวอย่าง - ทีนี้ลองมาทำกันจริงๆ ดูคะ
จะใช้ภาพนี้เป็นภาพพื้นหลังด้านนอกนะค่ะ
จะใช้ภาพนี้เป็นภาพพื้นหลังด้านในนะค่ะ
จะใช้ภาพนี้เป็นภาพหัวบล็อกนะค่ะ
ส่วนนี้นำไปวางใน Script Area ค่ะ
<style>body{background-attachment: fixed;background-image:url(//www.eyehome.net/create/back/bg1/20050909_1128868526.jpg);} </style> |
ส่วนนี้นำไปวางใน Slogan ค่ะ
<table bordercolorlight="#ffffff" bordercolordark=" #e7e0c9 " align="center" background="none" border="1" cellpadding="0" cellspacing="0" width="65%"><tbody><tr><td>
<table style="border-collapse: collapse;" bordercolorlight="#ffffff" bordercolordark="#e7e0c9" align="center" background=" //www.eyehome.net/create/back/back_new/1127317213.jpg " border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><table style="background: ;";cellpadding="0" cellspacing="0" align="center"><tr><td><table style="background: ;";cellpadding="0" cellspacing="0" align="center"><tr><td><center>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center"> <tr> <td width="733" height="300" <img border="0" src=" //i138.photobucket.com/albums/q248/poypk/blog/picH.gif " </tr></table>
|
ทดสอบตรงนี้ค่ะ