嗨,我不知道如何解决这个问题,要调整 div 的大小,我使用“溢出:隐藏”,但如果我把它拖出 div(我可以但它是透明的),如果我退出它并调整大小div 不隐藏:
HTML
<div class="region">
dragg to me MADA FAKA
</div>
<div id="tabs">
<ul>
<li><a href="#tabs-1">tab-1</a></li>
<li><a href="#tabs-2">tab-2</a></li>
<li><a href="#tabs-3">tab-3</a></li>
</ul>
<div id="tabs-1">
<div class="destacado" title="destacado">
DRAGGABLE TO MADAFAKA 1
</div>
</div>
<div id="tabs-2">
<div class="destacado" title="destacado">
DRAGGABLE TO MADAFAKA 2
</div>
</div>
<div id="tabs-3">
<div class="destacado" title="destacado">
DRAGGABLE TO MADAFAKA 3
</div>
</div>
</div>
CSS
#tabs
{
position: fixed;
overflow: hidden;
width: 320px;
height: 150px;
padding: 0.5em;
border: 1px solid black;
z-index: 2;
}
.destacado
{
border: 2px solid black;
}
.region
{
width: 200px;
height: 200px;
border: 2px solid red;
}
JS:
$('#tabs').tabs();
$('#tabs').resizable();
$('#tabs').draggable();
$('.region').sortable(
{
connectWith: '.region',
items: 'div[title="destacado"]'
});
$('#tabs-1, #tabs-2, #tabs-3').sortable(
{
connectWith: '.region',
items: 'div[title="destacado"]'
});
没有溢出的jsFiddle:隐藏:http: //jsfiddle.net/hq9Pw/2/
jsFiddle 溢出:隐藏:http: //jsfiddle.net/hq9Pw/3/