小编Phi*_*cot的帖子

如何在CSS中从右向左缩放?

我正在尝试动画缩放div元素.但动画从中心开始并传播.有没有一种动画从右边开始并向左边传播?

.graybox {
  float: right;
  background-color: gray;
  height: 100px;
  width: 400px;
  line-height: 100px;
  -webkit-animation: main 250ms;
  -moz-animation: main 250ms;
  -ms-animation: main 250ms;
  animation: main 250ms;
}

@-moz-keyframes main {
  0% {
    -moz-transform: scaleX(0);
  }
  100% {
    -moz-transform: scaleX(1);
  }
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

html css css3 css-animations

2
推荐指数
1
解决办法
7240
查看次数

标签 统计

css ×1

css-animations ×1

css3 ×1

html ×1