[英]CSS letter-spacing transition does not work in Firefox v26
This transition works in Chrome and IE11 but not in Firefox v26 Win7. 此过渡在Chrome和IE11中有效,但在Firefox v26 Win7中无效。
MDN specification says it's still in a working draft. MDN规范说它仍在起草中。
CSS-TRICKS says it's animatable without any note about not working in Firefox. CSS-TRICKS表示,可以动画化,而无需任何关于不能在Firefox中使用的注释。
This js fiddle demonstrates the behavior. 此js小提琴演示了该行为。
Any ideas? 有任何想法吗?
.trans {
-moz-transition: all 1s;
transition: all 1s
}
.spaced {
letter-spacing: 10px
}
$("#btn").on('click', function() {
$("h1").toggleClass("spaced");
});
<h1 class="trans">Animate my letter spacing</h1>
<input type="button" value="animate" id="btn">
Interpolation between normal
(the default value) and a length is not defined in the spec. 规范中没有定义
normal
(默认值)和长度之间的插值。 You want to transition from 0
to 10px
, not normal
to 10px
. 您想要从
0
过渡到10px
,而不是normal
过渡到10px
。
Try this instead of using css you can just .animate 试试这个代替使用css,你可以只.animate
http://jsfiddle.net/cornelas/8jAZy/9/ http://jsfiddle.net/cornelas/8jAZy/9/
$("#btn").on('click', function() {
$("h1").animate({ "letter-spacing" : "10px"});
});
This is one method there may be another that works. 这是一种方法,可能还有另一种方法可行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.