CSS relative属性之霸气外露实例页面

代码:

CSS代码:
.demo img { margin-right:-1em; border:3px solid #34538b; box-shadow:0 0 5px rgba(0,0,0,.75); vertical-align:middle; }
                
HTML代码:
<img id="target" src="http://image.zhangxinxu.com/image/study/s/s128/mm1.jpg" />
<img src="http://image.zhangxinxu.com/image/study/s/s128/mm2.jpg" />
<img src="http://image.zhangxinxu.com/image/study/s/s128/mm3.jpg" />
<p><input type="button" id="button" value="点击我第一张图片应用position:relative" /></p>
                
JS代码:
$("#button").click(function() {
    $("#target").css("position", "relative");	
});
                

效果: