react实现红包雨抢红包效果代码
代码语言:html
所属分类:红包
代码描述:react实现红包雨抢红包效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> div { margin: 0; padding: 0; } @-webkit-keyframes heartBeat { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1.05); } } @keyframes heartBeat { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1.05); } } @-webkit-keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @-webkit-keyframes zoomIn { from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); } 50% { opacity: 1; } } @keyframes zoomIn { from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); } 50% { opacity: 1; } } @-webkit-keyframes tada { 0, 10%, 20% { transform: rotate3d(0, 0, 1, -3deg); } 30%, 50%, 70%, 90% { transform: rotate3d(0, 0, 1, 3deg); } 40%, 60%, 80% { transform: rotate3d(0, 0, 1, -3deg); } to { transform: scale3d(1, 1, 1); } } @keyframes tada { 0, 10%, 20% { transform: rotate3d(0, 0, 1, -3deg); } 30%, 50%, 70%, 90% { transform: rotate3d(0, 0, 1, 3deg); } 40%, 60%, 80% { transform: rotate3d(0, 0, 1, -3deg); } to { transform: scale3d(1, 1, 1); } } html, body { padding: 0; margin: 0; width: 100%; height: 100%; } #app { width: 100%; height: 100%; background-image: url(//repo.bfw.wiki/bfwrepo/image/5de084d231193.png); } .countdown { position: absolute; z-index: 1; text-align: center; font-size: 14px; color: #fff; display: flex; width: 100%; margin-top: 50px; flex-direction: column; align-items: center; font-weight: 600; line-height: 24px; } .countdown .count { font-size: 24px; color: #FFB800; font-weight: 700; } .hongBaoWrap { position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate3d(-50%, -50%, 100px); } .hongBaoWrap .hongBao { position: relative; background: #db2647; border-radius: 8px; width: 146px; height: 215px; text-align: center; overflow: hidden; } .hongBaoWrap .hongBao.toda { -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-nam.........完整代码请登录后点击上方下载按钮下载查看
网友评论0