阴影效果 CSS+DIV 2022-07-15 80酷酷网 80kuku.com css原代码: HTML代码<!DOCTYPE html PUBLIC "-//W3C//DTD 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head><style>#w{ width:200px; font-size:12px; margin-left:auto; margin-right:auto;}.ac { display:block; background:#bbbbbb; border:1px solid #dddddd; position:relative; margin:1px 0; }.bc { display:block; background:#777777; border:1px solid #999; position:relative; padding:1px; margin:1px; }.cc { text-align:center; background:#ffffff; border:1px solid #555; position:relative; padding:5px; font-weight:normal; }.dc{ background-color: #CCCCCC; border: 1px solid #999999;}</style></head><body><div id="w"> <div class="ac"> <div class="bc"> <div class="cc"> <div class="dc"> <p>这是一张图片</p> </div> </div> </div> </div></div></body></html>修改后的代码: HTML代码<!DOCTYPEhtml PUBLIC "-//W3C//DTD 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head><style>img{display: block;}#w{ float:left;}.ac{ background:#bbbbbb; border:1px solid #dddddd; }.bc{ background:#777777; border:1px solid #999; padding:1px;margin:1px;}.cc { background:#ffffff; border:1px solid #555; padding:5px;}.dc{ background: #CCCCCC; border: 1px solid #999999;}</style></head><body><div id="w"> <div class="ac"> <div class="bc"><div class="cc"> <div class="dc"> <ahref="http://www.zishu.cn" target="_blank"><imgsrc="http://file.wbgxw.com/UpLoadPic/2007-4/200741142155602.gif" alt="子鼠"border="0" /></a> </div> </div> </div></div></div></body></html>