我想在 .preview 和 .shortcut 之外显示一个关闭按钮,它们都具有属性溢出:隐藏。position: absolute 不起作用,我不知道如何解决这个问题,因为父 div 会动态调整大小。
任何帮助,将不胜感激
https://dl.dropboxusercontent.com/u/12598822/close_revert.html
HTML:
<div class="shortcut" id="3"><div class="preview thumbs">
<a class="cross" id="crosshidden" href="#"></a>
<a class="link" href="http://master.elementaryos.org/developer"><img class="thumb" src="http://api.webthumbnail.org?width=500&height=499&format=png&screen=1024&url=dribbble.com" title="Developer | elementary OS"></a>
</div><div class="title">Dribbble</div></div>
CSS:
.shortcut {
overflow: hidden;
/*border: 1px solid blue;*/
position: relative;
overflow: hidden;
display:inline-block;
}
.preview {
width: 90%;
height: 75%;
margin: auto;
border: 1px solid #aaaaaa;
/*-webkit-border-image: -webkit-gradient(linear, left top, left bottom, from(white), to(black));
*/position: relative;
-webkit-border-radius: 3px;
overflow: hidden;
-webkit-box-shadow: inset 0 0 10px rgba(0,0,0,.15);
/*-webkit-box-shadow: 0 0 10px rgba(0,0,0,.15);*/
}