首页 > 编程知识 正文

html5 css js案例,html5和css3总结

时间:2023-05-06 07:45:08 阅读:16476 作者:4204

html:

CSS(1) :

css3中的动画帧将旋转

@keyframes tea_arrow {

0 % {变换3360 rotatez (180 deg ); }

25 % {变换3360 rotatez (135 deg ); }

50 % {传输3360旋转(90度); }

75 % { transform 3360 rotatez (45度); }

100 % {传输3360 rotatez (0deg ); }

}

@keyframes tea_arrow1 {

0 % {变换3360 rotatez (0deg ); }

25 % {传输3360旋转(45度); }

50 % {传输3360旋转(90度); }

75 % {变换3360 rotatez (135 deg ); }

100 % {传输3360 rotatez (180 deg ); }

}

. tea _ arrow down { animation : tea _ arrow 0.5s linear; 变换-定向3360中心; 变换: rotatez (0deg ); }

. tea _ arrow up { animation : tea _ arrow 10.5 s linear; 变换-定向3360中心; 变换: rotatez (180 deg; }

CSS(2) :

css3过渡属性旋转属性

. tea _ arrow down { transition :8 s; 变换-定向3360中心; 变换: rotatez (0deg ); }

. tea _ arrow up { transition : 0.8s; 变换-定向3360中心; 变换: rotatez (180 deg; }

jQ:

在jq中,您只需要确定是否包含发生的动画的类

~ (功能() )。

varBTN=$(.tea_getBTN );

varanicon=$(.tea_getdetail );

vararrow=$(.tea_arrow );

BTN.on('click ',function ) ) }

if (! arrow.Hasclass(tea_arrowdown )! arrow.Hasclass(tea_arrowup ) ) }

arrow.addclass(tea_arrowup );

} else if (arrow.hasclass (tea _ arrow up ) ) )。

arrow.removeclass(tea_arrowup ) ).add class (tea _ arrow down );

} else if (arrow.hasclass (tea _ arrow down ) ) )。

arrow.remove class (tea _ arrow down ) ).add class (tea _ arrow up );

}

);

() );

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。