龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > div+css/html >

用相对定位和负向移动完成图片象框阴影-(0)

时间:2012-12-29 08:41来源:未知 作者:admin 点击:
分享到:
style .out { position:relative; background:#bbb; margin:10px auto; width:285px } .in { background:#fff; border:1px solid #555; padding:10px 5px; position:relative; top:-5px; left:-5px; } /style div class="out" div class="in" img src=" http:

<style>
.out {
  position:relative;
  background:#bbb;
  margin:10px auto;
  width:285px
  }
.in {
  background:#fff;
  border:1px solid #555;
  padding:10px 5px;
  position:relative;
  top:-5px;
  left:-5px;
  }
</style>
<div class="out"> <div class="in" > <img src="http://www.webjx.com/img/200406301.jpg" alt="" /> </div></div>

    [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]



精彩图集

赞助商链接