TweenMax实现简洁多层交互式进度条效果代码
代码语言:html
所属分类:进度条
代码描述:TweenMax实现简洁多层交互式进度条效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html> <head> <style> body { background: #E8DFD9; } .squares { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); } .boxes { position: fixed; top: 50%; left: 50%; width: 90%; max-width: 790px; height: 180px; font-family: "Open Sans", sans-serif; transform: translate(-50%, -50%); } .box { position: relative; display: flex; align-items: center; flex-direction: row; background: #FFF; width: 100%; height: 100%; border-radius: 20px; box-shadow: 40px 0 65px rgba(212, 197, 186, 0.4); padding: 0 80px; box-sizing: border-box; opacity: 0; transform-origin: center; transform: scale(1.2, 1.2); } .box:nth-child(1), .box:nth-child(2) { position: absolute; } .box:nth-child(1) { left: 3%; width: 94%; } .box:nth-child(2) { left: 2%; width: 96%; } .progress { position: relative; display: flex; flex-direction: row; justify-content: space-between; width: 100%; } .bar { position: absolute; top: 50%; left: 50%; background: #E8DFD8; width: 100%; height: 3px; border-radius: 10px; transform: translate(-50%, -50%); overflow: hidden; } .bar__fill { display: block; background: #BD8044; height: 100%; } .point { position: relative; color: #AC9585; cursor: pointer; } .point:before { content: ""; position: absolute; top: 50%; left: 50%; width: 120px; height: 120px; border-radius: 100%; transform: translate(-50%, -50%); transition: 0.3s ease; } .show-radius .point:before { background: rgba(0, 0, 0, 0.1); } .point--complete, .point--active { color: #BA7C3F; } .bullet { z-index: 1; position: relative; background: #AC9585; width: 8px; height: 8px; border-radius: 100%; transition: 0.3s ease; } .point--complete .bullet, .point--active .bullet { background: #FFFFFF; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 6px #BD8044; } .point--active .bullet { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 10px #BD8044; } .label { position: absolute; top: 100%; left: 50%; margin: 20px 0 0 0; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; transform: translate(-50%, 0); } .radius-toggle { position: absolute; top: 20px; left: 20px; display: block; background: #FFF; border: 0; border-radius: 4px; box-shadow: 40px 0 65px rgba(212, 197, 186, 0.4); padding: 10px; color: #BA7C3F; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; } </style> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/TweenMax.min.js"></script> </head> <body> <div class="boxes"> <div class="box"></div> <div class="box"></div> <div class="box"> <div class="progress"> <div class="bar"> <div class="bar__fill".........完整代码请登录后点击上方下载按钮下载查看
网友评论0