Senin, 02 September 2013

Box Shadow

Box Shadow digunakan untuk menambahkan bayangan ke kotak.
Bentuk Dasar:

box-shadow: (offset-x) (offset-y) (blur-radius) (color);

Keterangan:
  • box-shadow: propertty-name.
  • (offset-x) : Jarak pergeseran horizontal efek bayangan terhadap objekutama, bisa bernilai positif (ke arah kanan) atau negatif (ke kiri).
  • (offset-y) : Jarak pergeseran vertikal efek bayangan terhadap objekutama, bisa bernilai positif (ke arah bawah) atau negatif (ke atas).
  • (blur-radius) : Jarak efek blur bayangan. Bila dimasukkan nilai nol (0) atau tidak ditentukan maka tidak ada efek blur pada bayangan.
  • (color) : warna bayangan.
 Contoh code menambahkan Box Shadow ke elemen div:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Cth Box shadow</title>
<style type="text/css">
div
{
width:200px;
height:80px;
background-color:#CCCCCC;
-moz-box-shadow: 10px 10px 5px  #777777; /* Firefox 3.6 and earlier */
-webkit-box-shadow: 10px 10px 5px #777777; /* Safari */
box-shadow: 10px 10px 5px #777777;
}
</style>
</head>
<body>

<div></div>

</body>
</html>

SELAMAT MENCOBA !
thumbnail
Judul: Box Shadow
Rating: 100% based on 99998 ratings. 5 user reviews.
Ditulis Oleh

Artikel Terkait Parse HTML :

2 komentar: