ลำดับตอนที่ #53
คืนค่าการตั้งค่าทั้งหมด
คุณแน่ใจว่าต้องการคืนค่าการตั้งค่าทั้งหมด ?
ลำดับตอนที่ #53 : [my.id] เปลี่ยน background เฉพาะหน้าหลัก
เผื่อใครอยากได้ bg หน้าหลักที่แตกต่างจากหน้าอื่น ๆ ก็ใช้โค้ดนี้ได้ค่ะ
โค้ดนี้จะตั้งค่าให้ภาพอยู่กับที่ ไม่เลื่อนตามสกอล์บาร์นะคะ
body {
background-image:url(http://ที่อยู่ของรูป);
background-color: #FFFF66;
background-attachment:fixed;
background-repeat: repeat;
}
Propety อื่น ๆ ของ background ที่น่าสนใจค่ะ
Property | Description | Values |
---|---|---|
background | A shorthand property for setting all background properties in one declaration | background-color background-image background-repeat background-attachment background-position |
background-attachment | Sets whether a background image is fixed or scrolls with the rest of the page | scroll fixed |
background-color | Sets the background color of an element | color-rgb color-hex color-name transparent |
background-image | Sets an image as the background | url(URL) none |
background-position | Sets the starting position of a background image | top left top center top right center left center center center right bottom left bottom center bottom right x% y% xpos ypos |
background-repeat | Sets if/how a background image will be repeated | repeat repeat-x repeat-y no-repeat |
เก็บเข้าคอลเล็กชัน
ความคิดเห็น