Untuk menghemat waktu , kita bisa mendeklarasikan semua property background mulai dari background-color, background-image, background-repeat, background-position dan background-attachment sekaligus. Untuk keperluan ini kita cukup memakai property background saja.

Langsung kita coba aja nya, biar lebih mudah...
Ini contoh kode CSS nya :

<html>
<head>
<style type="text/css">
body
{
background: yellow url('d:\Ngeblog\24.gif')  no-repeat top center fixed ;
}
</style>
</head>

<body>
<p>Atur Property background sekaligus</p>
<p>Atur Property background sekaligus</p>
<p>Atur Property background sekaligus</p>
</body>

</html>


Dengan Kode CSS diatas, berarti kita akan membuat background dengan keadaan:
background-color = yellow
background-image = d:\Ngeblog\24.gif
background-repeat = no-repeat
background-position = top center
background-attachment = fixed

Dalam tampilan browser, Kode Css diatas akan tampak kira-kira seperti ini



Atur Property background sekaligus
Atur Property background sekaligus
Atur Property background sekaligus


Ngapain yaa belajar semua property satu-persatu, kalau akhirnya bisa diatur sekaligus. cape deeeehhh...
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Leave a comment

Bitcoin gratis Free bitcoin | Macul bitcoin | Free PSD Graphics