纯css实现爱心跳动动画效果
代码语言:html
所属分类:动画
代码描述:纯css实现爱心跳动动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> .heart { background-color: crimson; display: inline-block; width: 200px; height: 200px; position: relative; top: 0; transform: rotate(-45deg); position: absolute; left: 45%; top: 45%; animation: heartbeat 1.25s infinite; } .heart::before, .heart::after { content: ""; background-color: crimson; width: 200px; height: 200px; border-radius: 50%; position: absolute; animation: pulsecolor 1.25s infinite; } .heart::before { top: -100px; left: 0; } .heart::after { top: 0; left: 100px; } .right-eye { position: absolute; height: 15px; width: 15px; z-index: 1; border-radius: 50%; background-color: #000000; right: 60px; top: -10x; animation: blink 1s infinite; .right-eye::before { top: -50px; right: 0; } .right-eye::after { top: 0; right: 50px; } span { position: absolute; transition: all 0.3s; width: 10px; height: 10px; margin-left: 5px; margin-top: 5px; background: #000; border-radius: 50%; } } .left-eye { position: absolute; height: 15px; width: 15px; z-i.........完整代码请登录后点击上方下载按钮下载查看
网友评论0