缓出通常从左向右移动,现在我想从右到左改变它如何在我的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;
Hashem Qolam.. 6
没有默认方向为过渡荷兰国际集团的性质.并且ease-out
只是一个转换计时功能:
来自规格:
该
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; }
工作演示.