div+css实现向下滚动鼠标动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现向下滚动鼠标动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; margin: 0; padding: 0; } html, body { width: 100%; height: 100%; } .container { width: 100%; height: 100%; background-color: #c9d6df; display: flex; align-items: center; justify-content: center; } .field { display: flex; align-items: center; justify-content: space-around; width: 300px; } .mouse { width: 50px; height: 90px; border: 3px solid #333; border-radius: 60px; position: relative; } .mouse::before { content: ""; width: 12px; height: 12px; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background-color: #333; border-radius: 50%; opacity: 1; animation: wheel 2s infinite; -webkit-animation: wheel 2s infinite; } @keyframes wheel { to { opacity: 0; top: 60px; } } @-webkit-keyframes wheel { to { opacity: 0; top: 60px; } } .scroll { width: 60px; height: 60px; border: 2px solid #333; border-radius: 50%; position: relative; animation: down 1.5s infinite; -webkit-animation: down 1.5s infinite; } .scroll::before { content: ""; position: absolute; top: 15px; left: 18px; width: 18px; height: 18px; border-left: 2px solid #333; border-bottom: 2px so.........完整代码请登录后点击上方下载按钮下载查看
网友评论0