2019-03-08 css3制作音乐心率跳动

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .music-icon { text-align: right; padding-right: 50px; } span { display: inline-block; width: 2px; height: 120px; margin: 0 2px; background: red; } .one { height: 120px; -webkit-animation:waves 0.6s linear 0s infinite; } .two { height: 40px; -webkit-animation:waves 0.9s linear 0s infinite; } .three { height: 80px; -webkit-animation:waves 1s linear 0s infinite; } .four { height: 40px; -webkit-animation:waves 0.8s linear 0s infinite; } .paused { animation-play-state:paused; -webkit-animation-play-state:paused; } .playing { animation-play-state: running; -webkit-animation-play-state: running; } @-webkit-keyframes waves { 20% { height: 20px; } 40% { height: 40px; } 60% { height: 60px; } 80% { height: 80px; } 10% { height: 120px; } } </style> </head> <body> <div class="music-icon-animate "><span class="one playing"></span><span class="two playing"></span><span class="three playing"></span><span class="four playing"></span></div> </body> </html>

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1、属性选择器:id选择器 # 通过id 来选择类名选择器 . 通过类名来选择属性选择器 ...
    Yuann阅读 1,680评论 0 7
  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    love2013阅读 2,357评论 0 11
  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    wzhiq896阅读 1,834评论 0 2
  • 多曾不愿几丝愁,广寒宫里几知怜。人间未有那方情,孤却却时无此生。花下竟是昨日殇,梦里在寻伊人醉。
    东方少s阅读 173评论 0 0
  • 这是一本讲述网络广告及技术的书。 从本质,由因到果。 作者: 刘鹏,奇虎360高级总监、商业产品首席架构师,负责3...
    王储阅读 10,825评论 1 14