css box glow code example

Example 1: css glow effect

div {
    width: 150px;
    height: 150px;
    background-color: #fff;

    box-shadow: 120px 80px 40px 20px #0ff;
    /* in order: x offset, y offset, blur size, spread size, color */
    /* blur size and spread size are optional (they default to 0) */
}

Example 2: image shadow css

<!Doctype>
<html>
<head>
  <style>
    .img {
      width: 400px;
      height: 200px;
      border:2px solid #fff;
      background: url(img/tiger.png) no-repeat;
      box-shadow: 10px 10px 5px #ccc;
      -moz-box-shadow: 10px 10px 5px #ccc;
      -webkit-box-shadow: 10px 10px 5px #ccc;
      -khtml-box-shadow: 10px 10px 5px #ccc;
    }
  </style>
</head>
<body>
  <div class="img"></div>
</body>
</html>

Tags:

Css Example