| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>用css给图片加上阴影</title> <style type="text/css"> <!-- body { text-align:center; margin:0 auto; }
.list li { list-style:none; float:left; background:#eee; position:relative; margin:1em; }
.list li img { position:relative; display:block; top:-2px; left:-2px; border:1px solid #ccc; background:#fff; padding:4px; }
.list li a { display:block; position:absolute; right:8px; bottom:8px; text-decoration:none; color:#000; font:9px/1.2em arial; }
.list li a:hover { color:#c00; } --> </style> </head> <body> <ul class="list"> <li><img src="http://www.shopex.cn/bbs/customavatars/18383.gif" alt="" /><a href="" title="">Design by photo</a></li> <li><img src="http://www.shopex.cn/bbs/customavatars/18383.gif" alt="" /><a href="" title="">Design by photo</a></li> <li><img src="http://www.shopex.cn/bbs/customavatars/18383.gif" alt="" /><a href="" title="">Design by photo</a></li> <li><img src="http://www.shopex.cn/bbs/customavatars/18383.gif" alt="" /><a href="" title="">Design by photo</a></li> <li><img src="http://www.shopex.cn/bbs/customavatars/18383.gif" alt="" /><a href="" title="">Design by photo</a></li> <li><img src="http://www.shopex.cn/bbs/customavatars/18383.gif" alt="" /><a href="" title="">Design by photo</a></li> </ul> </body> </html> |