缓出通常从左到右移动,现在我想将其更改为从右到左如何在我的CSS中设置它?
示例:
transition: background-position 150ms ease-out;
-moz-transition: background-position 150ms ease-out;
-webkit-transition: background-position 150ms ease-out;
-o-transition: background-position 150ms ease-out;
发布于 2014-03-02 00:56:36
没有默认值方向对于过渡调整属性。和ease-out
只是一个
从等级库
The transition-timing-function
属性描述如何计算转换期间使用的中间值。它允许转换在其持续时间内改变速度。这些效果通常被称为缓和函数。在这两种情况下,都会使用提供平滑曲线的数学函数。
方向background-position
转换,取决于首先和最后值。
例如:
.box {
/* other styles here... */
background-image: url(http://lorempixel.com/500/300);
transition: background-position 150ms ease-out;
}
/* Move the background image from right to left */
.box.rtl { background-position: 0 center; }
.box.rtl:hover { background-position: 100% center; }
/* Move the background image from left to right */
.box.ltr { background-position: 100% center; }
.box.ltr:hover { background-position: 0 center; }
工作演示..。
https://stackoverflow.com/questions/22115842
复制相似问题