这就是我将如何去做...
CSS:
#menuContainer{
position:relative;
background-color:#A3155C;
overflow:hidden;
height:10px;
padding:5px 5px 12px 5px;
}
#ddMenu{
position:absolute;
top:25%;
width:100%;
display:none;
}
#grippie{
height:16px;
display:inline-block;
position:absolute;
left:50%;
bottom:0px;
color:#FFF;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
width:40px;
font-size:12px;
}
JAVASCRIPT:
var h = parseInt($("#menuContainer").css('height')); //height mentioned in css - feel free to change
$("#menuContainer").resizable({
handles: {
"s":"#grippie"
},
maxHeight:50,
minHeight:0,
resize: function(){
if($(this).height()<=h){
$("#ddMenu").hide();
}else{
$("#ddMenu").show();
}
}
});
演示:http:
//jsfiddle.net/JXeWA/112/
希望这是您正在寻找的。需要帮助请叫我。