vue+TweenMax实现数字滚动动画效果代码
代码语言:html
所属分类:动画
代码描述:vue+TweenMax实现数字滚动动画效果代码,可自定义数字和动画时间。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200'> <style> body { display:flex; justify-content:center; align-items:center; width:100vw; height:100vh; overflow:hidden; background:radial-gradient(ellipse at bottom,#1b2735 0%,#090a0f 100%); color:#ddd; font-family:"Source Sans Pro",sans-serif; font-size:1.2rem; } .counter_form { position:absolute; top:0; left:0; margin:20px; } .counter_form_list { margin:0; padding:0; } .counter_form_item { display:flex; align-items:center; list-style:none; margin-bottom:10px; } .counter_form_label { display:block; width:80px; } .counter_form_input_text { width:100px; margin:0; padding:0; background:none; border:none; border-bottom:1px solid #ddd; color:#bbb; font-family:"Source Sans Pro",sans-serif; transition:300ms; } .counter_form_input_text:focus { color:#ffdd40; border-color:#ffdd40; } .counter_form_button { width:180px; height:30px; padding:0; margin:0; border-radius:4px; border:none; background:rgba(255,255,255,0.4); font-size:1.2rem; font-family:"Source Sans Pro",sans-serif; cursor:pointer; transition:300ms; } .counter_form_button:hover { background:#ffdd40; } .counter_monitor { color:#ffdd40; font-size:5rem; } input:focus { outline:none; } </style> </head> <body> <div class="counter" id="js-counter"> <form class="counter_form"> <ul class="counter_form_list"> <li class="counter_form_item"><label class="counter_form_label" for="start">start</label><input class="counter_form_input_text" id="start" type="number" v-model="start" /></li> <li class="counter_form_item"><lab.........完整代码请登录后点击上方下载按钮下载查看
网友评论0