Jquery 仿手机操作弹出动画
实现功能:
1、当点击按钮的时,模仿手机操作栏弹出的效果!
Jquery代码:
<script type="text/javascript">
$(document).ready(function(){
$(".btn1").click(function(){
if(flag){
flag = false;
$("#box").css("display","block").animate({top:"-=180px"});
}
});
});
var flag = true;
</script>
HTML代码:
<body>
<div style="position:relative;">
<!--呢个系装住全部内容的DIV,调成相对!! 滚动条就会为呢个左上角的x y轴为始点开始计算 top left ;-->
<div id="box" style="position:absolute; display:none; left:0px; top:180px; background:#999; height:60px; width:200px; ">
<!--left,top的数值自己微调-->
</div>
<img src="p_w_picpaths/1.jpg" ><br>
<button class="btn1">蓝牙</button>
</div>
</body>
-----上传了源文件,有需要的自己下载下来看看吧!
附件:http://down.51cto.com/data/2362188声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。