css 實現陰影製作效果代碼

來源:互聯網
上載者:User
提示:您可以先修改部分代碼再運行

<style type="text/css"> /* 為 DIV 加陰影 */.out { position:relative; background:#bbb; margin:10px auto; width:240px; } .in { background:#fff; border:1px solid #555; padding:10px 5px; position:relative; top:-5px; left:-5px; } /* 為 圖片 加陰影 */.imgShadow { position:relative; background:#bbb; margin:10px auto; width:220px; } .imgContainer { position:relative; top:-5px; left:-5px; background:#fff; border:1px solid #555; padding:0; } .imgContainer img { display:block; } </style>html<h4>為 DIV 加陰影:</h4> <div class="out"> <div class="in" > </div> </div> <h4>為 圖片 加陰影:www.111cn.net</h4> <div class="imgShadow"> <div class="imgContainer" > </div> </div></td> </tr></table>
提示:您可以先修改部分代碼再運行
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.