纯html+css3书写跳动的音符

 时间:2026-02-15 03:30:01

1、新建html文档。

纯html+css3书写跳动的音符

2、书写hmtl代码。

<div class="demo-music">

    <div class="music">

      <ul id="waves" class="movement">

        <li class="li1"><span class="ani-li"></span></li>

        <li class="li2"><span class="ani-li"></span></li>

        <li class="li3"><span class="ani-li"></span></li>

        <li class="li4"><span class="ani-li"></span></li>

        <li class="li5"><span class="ani-li"></span></li>

        <li class="li6"><span class="ani-li"></span></li>

      </ul>

      <div class="music-state"></div>

    </div>

    </div>

纯html+css3书写跳动的音符

3、初始化css代码。

<style>

*{ margin: 0; padding: 0; list-style: none; }

body{ background-color: #efefef; width : 100%; height : 100%; margin : 0; padding : 0; }

</style>

纯html+css3书写跳动的音符

4、书写css代码。

.demo-music { position: absolute; width: 100%; height: 200px; top: 120px; zoom: 1.5; }

.demo-music .music { width: 80px; height: 50px; top: 50%; left: 50%; -webkit-transform: translate(-40px, -25px); transform: translate(-40px, -25px); position: absolute; }

.demo-music #waves { width: 80px; height: 50px; position: absolute; top: 12px; left: 12px; }

.demo-music #waves li { position: relative; float: left; height: 100%; width: 12%; overflow: hidden; margin-right: 1px; }

.demo-music #waves li span { position: absolute; bottom: 0; display: block; height: 100%; width: 100px; background: radial-gradient(transparent 50%, rgba(255, 162, 162, 0.9) 100%); }

.demo-music #waves .li1 span { animation: waves 0.6s linear 0s infinite alternate; -webkit-animation: waves 0.6s linear 0s infinite alternate; }

.demo-music #waves .li2 span { animation: waves 0.9s linear 0s infinite alternate; -webkit-animation: waves 0.9s linear 0s infinite alternate; }

.demo-music #waves .li3 span { animation: waves 1s linear 0s infinite alternate; -webkit-animation: waves 1s linear 0s infinite alternate; }

.demo-music #waves .li4 span { animation: waves 0.8s linear 0s infinite alternate; -webkit-animation: waves 0.8s linear 0s infinite alternate; }

.demo-music #waves .li5 span { animation: waves 0.7s linear 0s infinite alternate; -webkit-animation: waves 0.7s linear 0s infinite alternate; }

.demo-music #waves .li6 span { animation: waves 0.5s linear 0s infinite alternate; -webkit-animation: waves 0.5s linear 0s infinite alternate; }

@-webkit-keyframes waves {  10% { height: 20%;} 20% { height: 60%;} 40% { height: 40%;} 50% { height: 100%;} 100% { height: 50%;}}

@keyframes waves {  10% { height: 20%;} 20% { height: 60%;} 40% { height: 40%;} 50% { height: 100%;} 100% { height: 50%;}}

纯html+css3书写跳动的音符

5、代码整体结构。

纯html+css3书写跳动的音符

6、查看效果。

纯html+css3书写跳动的音符

  • jquery如何获得页面中input输入框的个数
  • eclipse如何设置字符串的查找范围
  • HTML bdi 标签的用法
  • JAVA利用do,while语句制作无限计算器
  • 如何使用jquery方法设置和获取颜色选择器的值
  • 热门搜索
    永州旅游景点大全 青岛旅游住宿攻略 贵港旅游景点大全 九华山旅游地图 旅游论坛排名 南京旅游景点推荐 岳阳旅游景点大全 三山岛旅游 千岛湖旅游攻略自驾游 上海旅游节半价景点