即使我使用 css 缩放图像,我怎么能在图像的右上角保留一个关闭按钮?缩放是根据用户何时使浏览器缩放图像的大小不同。ps 当我使用 full_close {left:0px;} 时怎么会完全丢失图像 JSFIDDLE
.fit {
max-width: 100%;
}
.center {
display: block;
top: 0px;
right: 0;
}
.right {
position: relative;
right: 0;
}
#full_image {
width: 0px;
height: 0px;
left: 0px;
position: absolute;
opacity: 1;
z-index: 9;
}
#full_image img {
left: 0px;
position: fixed;
overflow: hidden;
}
#full_image ul {
width: 0px;
height: 0px;
list-style: none outside none;
position: relative;
overflow: hidden;
}
#full_image li:first-child {
display: list-item;
position: absolute;
}
#full_image li {
position: absolute;
display: none;
}
#full_image .full_close{
background-color:yellow;
top: 10px;
cursor: pointer;
height: 29px;
opacity: 1;
position: absolute;
width: 29px;
z-index: 999;
left: 0px;
}
<div id="full_image">
<ul><li><img class="center fit right" src="http://cdn.funkyspacemonkey.com/wp-content/uploads/2013/06/steve-wozniak-white-iphone-4.jpg"/></li></ul>
<span> <a href="#" class="full_close "></a></span>
</div>