【发布时间】:2017-12-30 21:08:48
【问题描述】:
我想要一个Call active animation 用于我的项目。我创建了一个,但对它的动画不是 100% 满意。我在这里粘贴我的代码,请帮助我创建一个不错的呼叫活动动画。如果你们有任何其他动画建议,请开火。ty 干杯。!
我想要的是 表示用户正在与另一个人交谈的动画。
.rc_side_phone {
display: inline-block;
font-size: 34px;
width: 38px;
height: 40px;
background: rgba(94, 178, 2, 0.56);
color: #fff;
line-height: 40px;
border-radius: 7px;
background: #4CAF50;
margin-left: 11px;
margin-top: 8px;
}
.rc_side_phone i {
line-height: 45px;
margin-left: 4px;
}
.rc_side_phone:after {
position: absolute;
content: '';
border-right: 2px solid #ffffff;
width: 10px;
left: 34px;
top: 28px;
height: 12px;
border-radius: 50%;
z-index: 9;
transform: rotate(-44deg);
-webkit-transform: rotate(-44deg);
animation: onCall 1s steps(5) infinite;
-webkit-animation: onCall 1s steps(5) infinite;
animation-delay: 0s;
}
.rc_side_phone:before {
position: absolute;
content: '';
border-right: 2px solid #ffffff;
width: 16px;
left: 33px;
top: 23px;
height: 17px;
border-radius: 50%;
z-index: 9;
transform: rotate(-44deg);
-webkit-transform: rotate(-44deg);
animation: onCallTwo 1s steps(10) infinite;
-webkit-animation: onCallTwo 1s steps(10) infinite;
/* animation-delay: 1.5s; */
}
@keyframes onCall {
0% {
width: 10px;
left: 34px;
top: 28px;
height: 12px;
}
100% {
width: 18px;
left: 31px;
top: 24px;
height: 19px;
}
/*100%{width: 10px;left: 34px;top: 28px;height: 12px;}*/
}
@-webkit-keyframes onCall {
0% {
width: 10px;
left: 34px;
top: 28px;
height: 12px;
}
100% {
width: 18px;
left: 31px;
top: 24px;
height: 19px;
}
}
@keyframes onCallTwo {
0% {
width: 16px;
left: 33px;
top: 23px;
height: 17px;
}
100% {
width: 18px;
left: 35px;
top: 18px;
height: 23px;
}
}
@-webkit-@keyframes onCallTwo {
0% {
width: 16px;
left: 33px;
top: 23px;
height: 17px;
}
100% {
width: 18px;
left: 35px;
top: 18px;
height: 23px;
}
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<span class="rc_side_phone">
<i class="fa fa-phone"></i>
</span>
【问题讨论】:
-
这不是问题。我认为这是一个相对的情况。
-
是的,这不是编程方面的问题,但这是
user-interface的问题 -
这个问题似乎更适合User Experience Stack Exchange。
标签: css user-interface animation css-transitions