css实现铃铛悬停摇摆动画效果代码
代码语言:html
所属分类:悬停
代码描述:css实现铃铛悬停摇摆动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> :root { --blue1: #70a1ff; --blue2: #1e90ff; } body { margin: 0; padding: 0; width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; } .notification { width: 80px; height: 80px; position: relative; transform-origin: 50% -10%; } .notification--top { position: absolute; top: 0%; left: 50%; transform: translate(-50%); height: 70%; width: 70%; background: var(--blue1); border-radius: 50% 50% 0 0; background: linear-gradient(var(--blue1) 60%, var(--blue2) 100%); } .notification--top::before { content: ""; position: absolute; top: -25%; left: 50%; transform: translate(-50%); height: 20%; width: 20%; background: var(--blue1); background: linear-gradient(var(--blue1) 0%, var(--blue2) 100%); border-radius: 50%; } .notification--top__ref { width: 30%; height: 20%; position: absolute; top: 15%; left: 55%; transform: rotate(20deg); background: radial-gradient(#fff, transparent); filter: blur(5px); border-radius: 50%; } .notification--btm { position: absolute; top: 60%; left: 50%; transform: translate(-50%); height: 20%; width: 100%; background: va.........完整代码请登录后点击上方下载按钮下载查看
网友评论0