码迷,mamicode.com
首页 > 其他好文 > 详细

跳动的心 有阴影 跳动

时间:2017-08-21 23:00:47      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:doc   height   init   position   absolute   box   div   转换   iter   

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>心的跳动</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}

body {
width: 100%;
background-color: #000;
}

.all {
margin: 100px auto;
width: 200px;
height: 200px;
position: relative;
animation-name: heard;
animation-duration: 0.5s;
animation-iteration-count: infinite;

}

.all div {
width: 100%;
height: 100%;
position: absolute;
background: #f00;
animation-name: shadow;
animation-duration: 0.5s;
animation-iteration-count: infinite;

}
.left,.right {
border-radius: 100px 100px 0 0 ;
}
.left {
transform: translate(-50px,0) rotate(-45deg);
}
.right {
transform: translate(50px,0) rotate(69deg);
}
.below {
transform: translate(0,64px) rotate(45deg) scale(.9,.9); /*scale:定义 2D 缩放转换。*/
}

@keyframes heard {
from {
transform:scale(.9,.9);
}
to {
transform:scale(1.1,1.1);
}
}
@keyframes shadow {
from {
}
to {
box-shadow:0px 0px 50px red; /*阴影*/
}
}
</style>
</head>
<body>
<div class="all">
<div class="left"></div>
<div class="right"></div>
<div class="below"></div>
</div>
</body>
</html>技术分享

跳动的心 有阴影 跳动

标签:doc   height   init   position   absolute   box   div   转换   iter   

原文地址:http://www.cnblogs.com/tangtangsimida/p/7407015.html

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