码迷,mamicode.com
首页 > Web开发 > 详细

css小动画:圆形1s内从小变大随时间渐变

时间:2015-10-26 00:39:26      阅读:354      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
.yxdh{
width:200px;
height:200px;
border: 1px solid red;
background-color: red;
transform:translate(400px,0px);
-webkit-transform:translate(400px,0px);
border-radius: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
animation-name:dh;
animation-duration: 1s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
-webkit-animation-name:dh;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: ease-in-out;
margin:100px auto;
}
@keyframes dh {
0%{
transform: scale(0);
opacity:100;
-webkit-transform: scale(0);
}
100%{
transform: scale(1);
opacity: 0;
-webkit-transform: scale(1);
}

}
@-webkit-keyframes dh {
0%{
transform: scale(0);
opacity: 100;
-webkit-transform: scale(0);
}
100%{
transform: scale(1);
opacity: 0;
-webkit-transform: scale(1);
}
}
</style>
</head>
<body>
<div class="yxdh"></div>
</body>
</html>


css小动画:圆形1s内从小变大随时间渐变

标签:

原文地址:http://www.cnblogs.com/yyt-caroline/p/4909997.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!