CSS-Schatten, Beispiel 08

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat.

Vel illum dolore eu feugiat nulla facilisis at vero et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.

Das Style-Sheet dieser Seite:

body {
   font-family: serif;
   background-color: #fff;
   color: #000;
   padding: 0;
   margin: 0;
   }

P {
   margin: 0.7em 1em;
   }

DIV.shadow, DIV.shadow2, DIV.shadow3, DIV.shadow4, DIV.shadow5 {
   padding: 1px;
   border-radius: 10px;
   -moz-border-radius: 10px;
   }
DIV.shadow5:hover DIV.shadow,
DIV.shadow5:hover DIV.shadow2,
DIV.shadow5:hover DIV.shadow3,
DIV.shadow5:hover DIV.shadow4,
DIV.shadow5:hover {
   padding: 0;
   border-radius: 5px;
   -moz-border-radius: 5px;
   }
DIV.shadow {
   background-color: #8e8e8e;
   border: 1px solid #959595;
   margin: 0px;
   }
DIV.shadow2 {
   background-color: #aaa;
   border: 1px solid #bebebe;
   margin: 0;
   }
DIV.shadow3 {
   background-color: #d1d1d1;
   border: 1px solid #e1e1e1;
   margin: 0;
   }
DIV.shadow4 {
   background-color: #ededed;
   border: 1px solid #f6f6f6;
   margin: 0;
   }
DIV.shadow5 {
   float: left;
   background-color: #fcfcfc;
   border: 1px solid transparent;
   margin: 10px 14px;
   }
DIV.shadow5:hover {
   border-width: 5px;
   }

DIV.shadow5 IMG {
   border: 0px solid #666;
   margin: -2px;
   display:block;
   position: relative;
   top: -3px;
   left: -3px;
   -moz-opacity:0.67;
   }
DIV.shadow5:hover IMG {
   margin: -1px;
   top: -1px;
   left: -1px;
   -moz-opacity:1;
   }

Das HTML für Grafik und Schatten:

<div class="shadow5"><div
 class="shadow4"><div
 class="shadow3"><div
 class="shadow2"><div
 class="shadow"><img
 src="../../graphics/shadowdemo1.jpg" width="225" height="169" alt=""
/></div></div></div></div></div>