我正在使用jQuery更改點擊後圖像的大小。無論點擊後圖像的大小如何,我怎樣才能保持右上角的關閉按鈕。 JSFIDDLE試圖保持圖像包含在另一個圖像
我的CSS
#full_image {
width: 0px;
height: 0px;
left: 0px;
position: relative;
opacity: 1;
z-index: 9;
}
#full_image img {
background: url("zoom-on.png") no-repeat;
background-position: 5px 5px;
left: 0px;
width: 339px;
height: 211px;
position: relative;
overflow: hidden;
}
#full_image .full_close{
background: url("zoom-on.png") no-repeat;
top: 10px;
cursor: pointer;
height: 29px;
opacity: 1;
position: absolute;
width: 29px;
z-index: 999;
right: 0px;
}
我的HTML
<div id="full_image"><img src=""/>
<span> <a href="#" class="full_close"></a></span>
</div>
的事情是我能保持包含#full_image內的圖像,但我需要它含有#full_image IMG
如果你想得到實際的幫助,請填寫完整的jsFidlle。 – avrahamcool
你是說'我需要它包含在#full_image img'中是什麼意思? –
#full_image img是什麼實際上包含圖像#full_image是一個容器,後一些jquery動畫變得大於圖像,因此這就是爲什麼我需要其他圖像包含在#full_image img –