jquery实现点线动画效果代码
代码语言:html
所属分类:动画
代码描述:jquery实现点线动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { min-height: 100%; margin: 0; padding: 0; background-color: #22313F; } html { height: 100%; } #container { position:absolute; display: flex; align-items: center; justify-content: center; height:100%; width: 100%; } #dots { position:relative; height:400px; width: 400px; } .line{ position:absolute; width:2px; background-color: rgba(255, 255, 255, 0.2); left:50%; height:100%; transition: all 1s ease; border-radius: 50%; } .dot{ position:absolute; width:20px; height:20px; background-color: #FFF; top:0px; left:-9px; border-radius: 50%; transition: all .2s; animation: dots 2s ease-in-out infinite; opacity: 1; } .dot.hidden{ animation-iteration-count: 1 } @keyframes rot { 0% {transform: rotate(0deg);} 100% {transform: rotate(360deg);} } @keyframes dots { 0% {transform: translateY(0px)} 50% {transform: translateY(380px) } 100% {transform: translateY(0) } } button{ position: absolute; top:15px; background-color: rgba(255, 255, 255, 0); outline: none; opacity: .3; margin:0; padding:0; z-index: 999; font-size: 20px; color: white; border-radius: 50%; border:2px solid white; line-height: 96px; width: 100px; cursor: pointer; transition: opacity .3s ease; } #dots-number-inc{ left:15px; } #dots-number-dec{ right:15px; } button:hover, button:active{ opacity: 1; } </style> </head> <body> <div id="container"> <div id="dots"></div> </div> <button id="dots-number-inc">+</button> <button id="dots-number-dec">-</button> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script&.........完整代码请登录后点击上方下载按钮下载查看
网友评论0