先上效果图

mui开发记录(五)水波涟漪动画

 

代码如下

//html部分
<div class="circle">
				<div class="c1"></div>
				<div class="c2"></div>
				<div class="c3"></div>
			</div>
			<div class="ic">
				<a onclick=""><img src="img/t.PNG" /></a>
				<audio></audio>
			</div>
  


//css部分
.ic{
	width: 90px;
	height: 90px;
	            position:absolute;
	
	            left:0;
	
	            top:30%;
	
	            right: 0;
	
	            margin: 0 auto;
				border-radius: 45px;
	
}

.ic img{
	width: 90px;
	height: 90px;
}
 body{

            background:#5a5a5a;

        }

 

        .circle {

            position:absolute;

            left:0;

            top:30%;

            right: 0;

            margin: 0 auto;

            width:90px;

            height:90px

 

        }

        .circle div {

            position:absolute;

            top:50%;

            left:50%;

            background:#FF0000;

            width:360px;

            height:360px;

            margin-left:-180px;

            margin-top:-180px;

            opacity:1;

            border-radius:180px;

            animation: 2s linear infinite;

            -webkit-animation: 2s linear infinite;

            -ms--webkit-animation: 2s linear infinite;

            -moz--webkit-animation: 2s linear infinite;

            -o--webkit-animation: 2s linear infinite;

 

        }

        .circle div.c1 {

            width:90px;

            height:90px;

            margin-left:-45px;

            margin-top:-45px;

            opacity:1;

            border-radius:180px

        }

        .circle div.c2 {

            -webkit-animation-name:c2;

            -webkit-animation-delay:.6s;

            -ms-animation-name:c2;

            -ms-animation-delay:.6s;

            -moz-animation-name:c2;

            -moz-animation-delay:.6s;

            -o-animation-name:c2;

            -o-animation-delay:.6s;

            animation-name:c2;  

            animation-delay:.6s; 

        }

        .circle div.c3 {

            -webkit-animation-name:c2;

            -webkit-animation-delay:1.2s;

            -ms-animation-name:c2;

            -ms-animation-delay:1.2s;

            -moz-animation-name:c2;

            -moz-animation-delay:1.2s;

            -o-animation-name:c2;

            -o-animation-delay:1.2s;

            animation-name:c2; 

            animation-delay:1.2s;

        }

        @-webkit-keyframes c2 {

            0% {

                -webkit-transform:scale(.222);

                -ms-transform:scale(.222);

                -moz-transform:scale(.222);

                -o-transform:scale(.222);

                transform:scale(.222);

                opacity:1

            }

            50% {

                -webkit-transform:scale(.622);

                -ms-transform:scale(.622);

                -moz-transform:scale(.622);

                -o-transform:scale(.622);

                transform:scale(.622);

                opacity:.4

            }

            98% {

                -webkit-transform:scale(1);

                -ms-transform:scale(1);

                -moz-transform:scale(1);

                -o-transform:scale(1);

                transform:scale(1);

                opacity:.2

            }

            100% {

                opacity:0

            }

        }

        @-ms-keyframes c2 {

            0% {

                -webkit-transform:scale(.222);

                -ms-transform:scale(.222);

                -moz-transform:scale(.222);

                -o-transform:scale(.222);

                transform:scale(.222);

                opacity:1

            }

            50% {

                -webkit-transform:scale(.622);

                -ms-transform:scale(.622);

                -moz-transform:scale(.622);

                -o-transform:scale(.622);

                transform:scale(.622);

                opacity:.4

            }

            98% {

                -webkit-transform:scale(1);

                -ms-transform:scale(1);

                -moz-transform:scale(1);

                -o-transform:scale(1);

                transform:scale(1);

                opacity:.2

            }

            100% {

                opacity:0

            }

        }

        @-moz-keyframes c2 {

            0% {

                -webkit-transform:scale(.222);

                -ms-transform:scale(.222);

                -moz-transform:scale(.222);

                -o-transform:scale(.222);

                transform:scale(.222);

                opacity:1

            }

            50% {

                -webkit-transform:scale(.622);

                -ms-transform:scale(.622);

                -moz-transform:scale(.622);

                -o-transform:scale(.622);

                transform:scale(.622);

                opacity:.4

            }

            98% {

                -webkit-transform:scale(1);

                -ms-transform:scale(1);

                -moz-transform:scale(1);

                -o-transform:scale(1);

                transform:scale(1);

                opacity:.2

            }

            100% {

                opacity:0

            }

        }

        @-o-keyframes c2 {

            0% {

                -webkit-transform:scale(.222);

                -ms-transform:scale(.222);

                -moz-transform:scale(.222);

                -o-transform:scale(.222);

                transform:scale(.222);

                opacity:1

            }

            50% {

                -webkit-transform:scale(.622);

                -ms-transform:scale(.622);

                -moz-transform:scale(.622);

                -o-transform:scale(.622);

                transform:scale(.622);

                opacity:.4

            }

            98% {

                -webkit-transform:scale(1);

                -ms-transform:scale(1);

                -moz-transform:scale(1);

                -o-transform:scale(1);

                transform:scale(1);

                opacity:.2

            }

            100% {

                opacity:0

            }

        }

        @keyframes c2 {

            0% {

                -webkit-transform:scale(.222);

                -ms-transform:scale(.222);

                -moz-transform:scale(.222);

                -o-transform:scale(.222);

                transform:scale(.222);

                opacity:1

            }

            50% {

                -webkit-transform:scale(.622);

                -ms-transform:scale(.622);

                -moz-transform:scale(.622);

                -o-transform:scale(.622);

                transform:scale(.622);

                opacity:.4

            }

            98% {

                -webkit-transform:scale(1);

                -ms-transform:scale(1);

                -moz-transform:scale(1);

                -o-transform:scale(1);

                transform:scale(1);

                opacity:.2

            }

            100% {

                opacity:0

            }

        }




 

相关文章:

  • 2022-02-02
  • 2022-12-23
  • 2022-02-11
  • 2021-08-11
  • 2021-07-08
  • 2021-04-28
  • 2021-07-26
  • 2021-08-31
猜你喜欢
  • 2021-09-20
  • 2022-12-23
  • 2021-12-10
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案