Translucent text 2, 2, HTML floating on the Image Code
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 strict // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <HTML xmlns = "http://www.w3.org/1999/xhtml" XML: lang = "en" lang = "en">
3. CSS Code
/* CSS style sheet for your captions-2a.html] created by [serein_chan] Email: [Serein_Chan@foxmail.com] author blog: [inline * // * body style */body {margin: 0; padding: 0; Background-color: # FFF; Font: 62.5% verdana, sans-serif; color: # 4d4d4d;} p {margin: 0; padding: 0 0 0 1em 0 ;}. captioned_photo {position: relative;/* sets the positioning type of the DIV block so that the sub-element P contained in the DIV block can be located relative to the DIV block rather than the HTML element */width: 240px; display: block; margin: 1em 1em 1em; padding: 1em; Border: 1px solid # CCC; border-top-color: # Eee; border-right-color: # DDD; border-bottom-color: # BBB; Background: URL (images/bg.gif) Bottom left repeat-X;/* Div block gradient background */line-height: 1em; text-align: Left ;}. captioned_photo P {position: absolute;/* relative to the most recently located ancestor element */bottom: 2.25em; left: 1.375em; display: block; width: 240px; /* Set */margin: 0; padding: 0; Background: URL (images/caption-black.png) top left repeat-y to match the image width; /* use a translucent image as the background to achieve transparent cascade effect */font :. 9em verdana, sans-serif; letter-Spacing :. 05em;/* set the space between characters */color: # FFF ;}. captioned_photo P span {display: block; padding: 1em ;}. captioned_photo IMG {margin: 0 0 -. 0625em 0; padding: 0 ;}
reference: The Art & Science of CSS