javascript - Click the button to make the div show and hide. There is animation. Click to show it but it cannot be taken back.
大家讲道理
大家讲道理 2017-05-19 10:19:06
0
1
374

$(function(){
$(".span").click(function(){

$(".position").animate({left:'0'});
$('.postion').toggleClass('.blue');

});
$(".span").click(function(){

$(".blue").animate({left:'-360px'});

});
})

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
刘奇

By default .span{

left: 100%;  // 默认是隐藏,可根据需求改变left的值
-webkit-transition: left .5s cubic-bezier(0.1, 0.57, 0.1, 1);

}

When clicked to display, add a class or toggle to the element
.page-slideLeft {

-webkit-transition: left .5s cubic-bezier(0.1, 0.57, 0.1, 1);
left: 0;

}

Finally, it’s not me who steps on you, I never step on others O(∩_∩)O~

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template