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

王朝other·作者佚名  2006-11-24
窄屏简体版  字體: |||超大  

<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>

<style>

.out {

position:relative;

background:#bbb;

margin:10px auto;

width:165px

}

.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 全部选择 提示:你可先修改部分代码,再按运行]

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航