Apa beza HTML dan CSS? HTML digunakan untuk struktur kandungan. Manakala CSS pula digunakan untuk mengformatkan kandungan berstruktur. Faham tak? Maksudnya lagi, CSS ni under HTML la. CSS ni lebih kepada layout. 1.body { background-attachment: fixed; }
Ade tiga posible value:inherit - maksudnye dia ikut yang format sebelumnye. (Specifies that the setting of the background-position property should be inherited from the parent element.)scroll(defult)- maksudnya gambar tu akan ke atas bila kita scroll. fixed - maksudnya gambar tu akan tetap.tak gerak2. 2. body { background-position: center; }
Posible value:left top left center left bottomright top right center right bottom center topcenter center center bottom 50% 50% (boley letak ape2 number yg kamu mahu) 50px 100px (dalam pixels. boley letak ape2 number yg kamu mahu) inherit 3. background-color:yellow;
body
{
background-color:yellow;
}
h1
{
background-color:#00ff00;
}
p
{
background-color:rgb(255,0,255);
}
This is heading 1 This is a paragraph.
0 KuTuKaN:
Post a Comment