美文网首页
CSS3过渡动画

CSS3过渡动画

作者: 苗_a | 来源:发表于2018-11-27 19:08 被阅读17次

过渡动画

transition属性简介
transition是网页上的过渡动画,变化的逐渐过渡效果,简称过渡动画!
列如:
transition: property duration timing-function delay;
border-radius:圆角 transition:产生动画
transition:all ... ease所有一起变
liner:匀速 ease-in:开始是慢速
ease-out:结束时慢速
scale:缩放 perspective:透视距离
transform:交换 skew:斜切

动画代码作业

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>动画图</title>
<style type="text/css">
.content{
width: 300px;
height: 125px;
border: 1px solid #000;
margin: 200px auto 0;
}
.content p{
text-align: center;
width: 100%;

    }
    .content div{
        width: 30px;
        height: 70px;
        float: left;
        background-color: lilac;
        margin: 15px;
        border-radius: 10px;
    }
    .content div:nth-child(1){
        background-color: red;
        animation: loading 500ms ease 0s infinite alternate;
    }
    .content div:nth-child(2){
        background-color: pink;
        animation: loading 500ms ease 100ms infinite alternate;
    }
    .content div:nth-child(3){
        background-color: purple;
        animation: loading 500ms ease 200ms infinite alternate;
    }
    .content div:nth-child(4){
        background-color: ivory;
        animation: loading 500ms ease 300ms infinite alternate;
    }
    .content div:nth-child(5){
        background-color: gray;
        animation: loading 500ms ease 400ms infinite alternate;
    }
    @keyframes loading{
        from{
            transform: scaleY(1);
        }
        to{
            transform: scaleY(0.5);
        }
    }
</style>

</head>
<body>
<div class="content">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<p>loding</p>
</div>
</body>
<ml>


图片.png

animation动画

暂停动画
div
{
animation-direction:alternate;
-webkit-animation-direction:alternate; /* Safari 和 Chrome */
}

相关文章

  • 08_dayCSS动画

    CSS3新增的功能有:过渡和动画,阴影和圆角 css3过渡动画: css3都有哪些新增的东西 : 过度,动画,阴影...

  • CSS3动画

    css3动画包括过渡,形变,动画 过渡transition: 指定过渡样式:transition-property...

  • web前端入门到实战:CSS3中的变形(transform)、过

    css3中制作动画的几个属性:css3中的变形(transform)、过渡(transition)、动画(anim...

  • web前端入门到实战:CSS3中的变形(transform)、过

    css3中制作动画的几个属性:css3中的变形(transform)、过渡(transition)、动画(anim...

  • web前端-CSS3动画

    动画和过渡的异同 相同点过渡和动画都是给元素添加动画的过渡和动画都是CSS3新增的属性过渡和动画都需要满足三要素才...

  • Bootstrap 手册 07 - JS 组件篇

    1. 动画过渡 Transition Bootstrap 对一些组件默认使用过渡动画效果,这种效果是由 CSS3 ...

  • 九、CSS新特性

    CSS3过渡动画 1、transition-property 设置过渡的属性,比如:width height ba...

  • 动画

    过渡动画: css3都有哪些新增的东西 : 过度,动画,阴影,圆角; 例题:transition :border-...

  • CSS3动画简要总结

    主要总结一下CSS3动画中这几块:transition(过渡),animation(动画),transform转换...

  • css动画

    css3动画 过渡:transition 2D 转换 transform 3D 转换 transform 动画:a...

网友评论

      本文标题:CSS3过渡动画

      本文链接:https://www.haomeiwen.com/subject/dednqqtx.html