js+css实现数字入场变化动画效果代码
代码语言:html
所属分类:动画
代码描述:js+css实现数字入场变化动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { padding: 0; margin: 0; box-sizing: border-box; font-family: "Poppins", sans-serif; } body { background: #2e363e; } .counter { padding: 1rem 0; } .single-number { padding: 15px; transition: all 0.6s; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); } .digit-box { display: block; font-size: 80px; font-weight: 700; color: #2fdb50; } .text-box { color: #fff; } .text-center { text-align: center; } .single-number:hover { background: #2fdb50; color: #fff; } .single-number:hover .digit-box { color: #fff; } @media (max-width: 1000px) { .single-number { margin-bottom: 30px; } .digit-box { font-size: 50px; } } </style> </head> <body translate="no"> <div class="counter text-center"> <div class="container"> <div class="row"> <div class="foo"> <div class="single-number"> <span class="digit-box" data-val="120">000</span> <span class="text-box">Different Locations</span> </div> </div> <div class="foo"> <div class="single-number".........完整代码请登录后点击上方下载按钮下载查看
网友评论0