3

私はこのCSSを持っています

#main .timer img.hand {
    position: absolute;
    left: 0;
    bottom: 0;
    transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg);
    transition: transform 1.25s ease-out 0s; -webkit-transition: -webkit-transform 1.25s ease-out 0s; -moz-transition: -moz-transform 1.25s ease-out 0s; -o-transition: -o-transform 1.25s ease-out 0s;
    transform-origin: 50% 98% 0; -webkit-transform-origin: 50% 98% 0; -moz-transform-origin: 50% 98% 0; -o-transform-origin: 50% 98% 0; -ms-transform-origin: 50% 98% 0;
}

JSで遷移値を抽出しようとしています。

var $timer = $('<img>', {'class': 'hand', 'src': 'images/timer-hand.png'});

console.log($timer.css('transition')) // returns an empty string

「-moz-transition」も試しましたが、結果は同じです。

$timer.css({'transition': 'none'}); // works fine

ありがとうございました

4

1 に答える 1

0

トランジション - 4 つのトランジション プロパティを 1 つのプロパティに設定するための省略形のプロパティ。

遷移プロパティ 遷移期間 遷移タイミング関数 遷移遅延

次のいずれかのプロパティを設定します。

console.log($timer.css('transition-property'));
console.log($timer.css('transition-delay'));
于 2013-03-11T10:51:36.863 に答える