我正在尝试将图像从左下角滑动到角落底部。
我正在使用此代码,但不支持js(方向)参数...
<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>
答案 0 :(得分:0)
您可以将 .animate()与 max-height
一起使用<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>
答案 1 :(得分:0)
slideToggle方法很容易做到这一点。
<强> HTML 强>
$(function(){
$("#man").slideToggle(500);
});
<强>的jQuery 强>
#man {
display: none;
position: fixed;
bottom: 0px;
right: 0px;
width: 200px;
height: 400px;
background: grey;
}
<强> CSS 强>
{{1}}
答案 2 :(得分:0)
<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>