svg实现地图标注表情动画效果
代码语言:html
所属分类:布局界面
代码描述:svg实现地图标注表情动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { display: flex; margin: 0; height: 100vh; justify-content: center; align-items: center; } svg { width: 80vmin; height: 80vmin; } .pin { animation: floating 1.5s ease-in-out infinite; } .pin circle[fill='#000'] { animation: eye-anim 1.5s ease infinite; } .pin circle[fill='#000']:last-of-type { animation-delay: -1s; } .pin-body { animation: pin-anim 1.5s linear infinite; } @keyframes pin-anim { 0%,100% { d: path('M16,20 q0,-16 16,-16 q16,0 16,16 q0, 8 -8, 16 q-8, 8 -8, 16 q0,-8 -8,-16 q-8,-8 -8,-16'); } 50% { d: path('M16,20 q0,-15 16,-16 q16,1 16,16 q0, 12 -8, 16 q-8, 4 -8, 16 q0,-12 -8,-16 q-8,-4 -8,-16'); } } @keyframes eye-anim { 50% { transform: translateY(-1px); } } @keyframes floating { 0%, 100% { transform: transla.........完整代码请登录后点击上方下载按钮下载查看
网友评论0