【问题标题】:How to make a css animation like this?如何制作这样的css动画?
【发布时间】:2019-03-06 07:50:28
【问题描述】:

我想知道如何用 css 制作这种动画: https://www.maman-corp.com/solutions 当您使用 worker 滚动到图像时,图像会从 0% 宽度变为 100% 并进行过渡。

【问题讨论】:

    标签: css animation css-transitions css-animations


    【解决方案1】:

    * {
      margin: 0;
      padding: 0;
    }
    html,
    body {
      height: 100%;
    }
    div {
      background: tomato;
      width: 100px;
      height: 100px;
      -webkit-animation: animateThis 1s ease-in;
      -webkit-animation-fill-mode: forwards;
    }
    @-webkit-keyframes animateThis {
      0% {
        width: 100px;
        height: 100px;
      }
      100% {
        width: 100%;
        height: 100%;
      }
    }
    <div></div>

    你可以在图像上做同样的事情。请改用图像类名称。

    【讨论】:

      猜你喜欢
      • 2016-03-27
      • 1970-01-01
      • 1970-01-01
      • 2012-01-16
      • 1970-01-01
      • 1970-01-01
      • 2019-11-25
      • 2021-06-20
      • 1970-01-01
      相关资源
      最近更新 更多