css 图片慢慢缩大变小

html-css015

css 图片慢慢缩大变小,第1张

这是 图片慢慢放大和缩小

.toShop-btn{

position: fixed

top:730rpx

width: 81rpx

height:91rpx

line-height: 48px

z-index:99

right:0rpx

-moz-animation: myfirst 1s infinite

-webkit-animation: myfirst 1s infinite

-o-animation: myfirst 1s infinite

animation: myfirst 1s infinite

}

@keyframes myfirst{

0% { transform: scale(.8)}

50% { transform: scale(1)}

100% { transform: scale(.8)}

}

<style type="text/css">

.font{font-size:12px}

.a{font-size:14px}

.b{font-size:16px}

.c{font-size:18px}

.d{font-size:20px}

//这里是最不好的表现形式,可以利用js里面的动画函数来执行并循环

}

</style>

<div class="font">我这是测试</div>

<div class="a">我这是测试</div>

<div class="b">我这是测试</div>

<div class="c">我这是测试</div>

<div class="d">我这是测试</div>