将图像从左到右滑动到角落jquery的底部
我试图将图像从左到右滑动到角落的底部 我正在使用此代码,但js不支持(方向)参数将图像从左到右滑动到角落jquery的底部,jquery,image,slide,Jquery,Image,Slide,我试图将图像从左到右滑动到角落的底部 我正在使用此代码,但js不支持(方向)参数 <script type="text/javascript"> $(window).load(function () { $("#man").show("slide", { direction: "down" }, 2000); }); </script> <style type="text/css"&
<script type="text/javascript">
$(window).load(function () {
$("#man").show("slide", {
direction: "down"
}, 2000);
});
</script>
<style type="text/css">
#man {
display: none;
position: fixed;
bottom: 0px;
right: 0px;
}
</style>
$(窗口).load(函数(){
美元(“#人”)。放映(“幻灯片”{
方向:“向下”
}, 2000);
});
#人{
显示:无;
位置:固定;
底部:0px;
右:0px;
}
您可以将.animate()与最大高度一起使用
<script type="text/javascript">
$(document).ready(function () {
$("#man").animate({
'max-height': "500px"
}, 2000);
});
</script>
<style type="text/css">
#man {
/*display: none;*/ no need
position: fixed;
bottom: 0px;
right: 0px;
max-height : 0px;
}
</style>
$(文档).ready(函数(){
$(“#人”)。制作动画({
“最大高度”:“500px”
}, 2000);
});
#人{
/*显示:无;*/无需
位置:固定;
底部:0px;
右:0px;
最大高度:0px;
}
这种方法很容易做到这一点
HTML
<div id="man"></div>
CSS
#man {
display: none;
position: fixed;
bottom: 0px;
right: 0px;
width: 200px;
height: 400px;
background: grey;
}
$(窗口)。加载(函数(){
美元(“#人”)。放映(“幻灯片”{
方向:“向下”
}, 2000);
});
#人{
显示:无;
位置:固定;
底部:0px;
右:0px;
}
此代码正在运行$加载(函数(){$(“#man”).show(“幻灯片”{direction:“Down”},2000);})#man{显示:无;位置:固定;底部:0px;右侧:0px;}
#man {
display: none;
position: fixed;
bottom: 0px;
right: 0px;
width: 200px;
height: 400px;
background: grey;
}
<script src="jquery-1.7.1.js"></script>
<script src="jquery-ui-1.8.20.js"></script>
<script type="text/javascript">
$(window).load(function () {
$("#man").show("slide", {
direction: "Down"
}, 2000);
});
</script>
<style type="text/css">
#man {
display: none;
position: fixed;
bottom: 0px;
right: 0px;
}
</style>