html怎么向下浮动,css3实现上下浮动的效果不少前端开发者会⽤到css3特效,今天在做页⾯时⽤到了⼀个上下浮动的效果,分享⼀下。html>
Document
div{
background: #639;
width: 235px;
height: 216px;
position: absolute;
top: 300px;
left: 300px;
}css特效文字
/*nimation-delay:1s*/
@keyframes arrow1{
0%{transform: translateY(0);}
100%{transform: translateY(20px);}
}
@-webkit-keyframes arrow1{
0%{-webkit-transform: translateY(0);}
100%{-webkit-transform: translateY(20px);}
}
.arrow{
animation: arrow1 2s infinite;
-webkit-animation: arrow1 2s infinite;
animation-timing-function:ease-in-out;
-webkit-animation-timing-function:ease-in-out;
-webkit-animation-direction:alternate;
animation-direction:alternate;
}
通过以上代码就能实现。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论