您当前的位置: 首页 >  壹小俊 jquery

Jquery第二课--效果

壹小俊 发布时间:2019-09-17 21:50:49 ,浏览量:3

a.
show()显示
hide()隐藏
toggle()切换上面两个方法
b.
fadeIn() 淡入
fadeOut() 淡出
fadeToggle()切换上面两个方法
fadeTo()允许渐变为给定的不透明度(值介于 0 与 1 之间)
c.
slideDown() 向下滑显示
slideUp()   向上滑动隐藏
slideToggle()切换上面两个方法
d.
animate({})动画
如需对位置进行操作,要记得首先把元素的 CSS position 属性设置为 relative、fixed 或 absolute!
e.
stop() 停止滑动




    
    
    
    Document


    
    
    
    
    
    
    b
    b1
    
$(function(){ $('#b').click(function () { $('#b2').slideDown(5000) }); $('#b1').click(function () { $('#b2').stop() }) $("#a").click(function(){ $(this).next().animate({left:'250px',width:'200px'}); }); $('#b10').click(function () { $(this).next().slideToggle(); }); $('#b9').click(function () { $(this).next().slideUp(); }); $('#b8').click(function () { $(this).next().slideDown(); }); $('#b7').click(function () { $(this).next().fadeTo('slow','0.3') }); $('#button1').click(function(){ $(this).next().next().hide('slow',function(){ alert(123) }); }); $('#button2').click(function(){ $(this).next().next().show('slow'); }); $('#button3').click(function(){ $(this).next().toggle('slow'); }); $('#button4').click(function(){ $(this).next().fadeIn('slow') }); $('#b5').click(function () { $(this).next().fadeOut('slow') }); $('#b6').click(function () { $(this).next().fadeToggle('slow') }) })

 

关注
打赏
查看更多评论

壹小俊

暂无认证

  • 3浏览

    0关注

    857博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录