首页 > 网站 > WEB开发 > 正文

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

2024-04-27 13:55:38
字体:
来源:转载
供稿:网友

     先看看代码,十分简单:

以下是引用片段:
<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="/imagelist/06/24/k6xq28872yvo.jpg" alt="" />
</div>
</div>


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表