我按照老師的打的,怎么沒有效果,
</head> <body> <div?class="kuangjia"> ????<div?class="shouye"> ????????<div?class="logo"> ??????? ????????</div> ????????<div?class="biaoti"> ? ????????</div> ????????<div?class="next"> ????????????查看內(nèi)容 ????????</div> ????</div> </div> <script?type="text/javascript"??src="js/script.js"></script> </body> </html>
(function??($)?{ ?????var?shouye?=?$(".shouye"); ?????var?logo?=?$(".logo"); ?????var?biaoti?=?$(".biaoti"); ?????var?open?=?$(".next"); ?????var?neirong?=?$(".neirong"); ?????var?upbox-left?=?$(".upbox-left"); ?????var?upbox-mid?=?$(".upbox-mid"); ?????var?upbox-right?=?$(".upbox-right"); ?????var?lowbox-left?=?$(".lowbox-left"); ?????var?lowbox-mid?=?$(".lowbox-mid"); ?????var?lowbox-right?=?$(".lowbox-right"); ?????var?bottom?=?$(".bottom"); ?????var?img?=?logo.find('img'); ?????$.Velocity.RegisterUI('shequ.slideUpIn',{ ????? defaultDuration:?500, ????? calls:[ ????? ?????[{opacity:?[1,?0],??translateY:?[0,1000]}] ????? ] ?????}); ?????var?seqInit?=?[ ?????{ ????? element:?logo, ????? properties:'shequ.slideUpIn', ????? options: ??????????{ ????? delay:300//開始的延時(shí) ????? } ?????}, ?????{ ????? element:?biaoti, ????? properties:'shequ.slideUpIn', ????? options: ??????????{ ????? delay:?60 ????? } ?????}, ?????{ ??????????element:?open, ??????????properties:'shequ.slideUpIn', ??????????options: ??????????{ ???????????????delay:?60 ??????????} ?????]; ????? ?????$.Velocity.RunSequence(seqInit); })(jQuery);
css就不放了,html內(nèi)容不是重點(diǎn),主要是看看js怎么沒有和html關(guān)聯(lián)上啊
2017-05-29
? ? ?element:?open,
??????????properties:'shequ.slideUpIn',
??????????options:
??????????{
???????????????delay:?60
??????????}
?????];
應(yīng)該改為如下:
? ? ?element:?open,
??????????properties:'shequ.slideUpIn',
??????????options:
??????????{
???????????????delay:?60
??????????}
????}
?????];
你是少加了一個(gè)右花括號(hào)?。。?/p>