CSMJU jQuery Mobile

เมนู
ถัดไป ก่อนหน้า

3.2 Toolbars

     g. Theming toolbars

ธีมของ header และ footer(Theming headers and footers)
   เริ่มต้นในส่วน header และ footer จะถูกกำหนดให้มีธีมเป็นสีดำ เพราะเป็นbarหลักของเพจ ในการกำหนดธีมให้กับ header และ footer ทำได้โดยเพิ่ม attribute ที่ชื่อว่า data-theme และระบุตัวอักษรได้ตั้งแต่ a-z

CD ไฟล์: Theming headers and footers.html

Page Title

Content...

Footer

สีธีมของปุ่มในToolbar(Theming buttons in toolbars)
   เมื่อมีการเพิ่มlink เข้ามาในส่วนของ header สีของปุ่มจะปรับไปเป็นสีเดียวกับสีของ bar โดยอัตโนมัติ และสามารถเปลี่ยนสีธีมของปุ่มได้โดยเพิ่ม attribute ที่ชื่อว่า data-theme ลงในปุ่มที่ต้องการเปลี่ยนสีเช่นกำหนดธีมของปุ่ม Save ให้เป็นสีน้ำเงิน


  <a href="#" data-theme="b">Save</a>
  

รูปแบบธีม(Theme variations)
   ต่อไปนี้เป็นตัวอย่างของการเปลี่ยนแปลงธีมที่สามารถทำได้ในส่วน header และ footer

ตัวอย่างหน้าจอ

Bar swatch "a"

New
Cancel

Bar swatch "a"

Save

Bar swatch "b"

New
Cancel

Bar swatch "b"

Save

Bar swatch "c"

New
Cancel

Bar swatch "c"

Save

Bar swatch "d"

New
Cancel

Bar swatch "d"

Save

Bar swatch "e"

New
Cancel

Bar swatch "e"

Save

ตัวอย่างหน้าจอ

left right up down
left right up down
left right up down
left right up down
left right up down