我沒有使用這個庫: css3 transit的速度要快得多,發生違約
,改變entrance.js(可能是你需要爲你適應,但這個工作對我來說)
define(['../system'], function(system) {
var fadeOutDuration = 100;
var entrance = function(parent, newChild, settings) {
return system.defer(function(dfd) {
function endTransition() {
dfd.resolve();
}
function scrollIfNeeded() {
if (!settings.keepScrollPosition) {
$(document).scrollTop(0);
}
}
if (!newChild) {
scrollIfNeeded();
if (settings.activeView) {
$(settings.activeView).transition({
opacity: 1,
scale: 0.3,
duration: duration,
easing: 'in',
complete: function(){
$(settings.activeView).css('display' ,'none');
if (!settings.cacheViews) {
ko.virtualElements.emptyNode(parent);
}
endTransition();
}
});
} else {
if (!settings.cacheViews) {
ko.virtualElements.emptyNode(parent);
}
endTransition();
}
} else {
var $previousView = $(settings.activeView);
var duration = settings.duration || 500;
function startTransition() {
scrollIfNeeded();
if (settings.cacheViews) {
if (settings.composingNewView) {
ko.virtualElements.prepend(parent, newChild);
}
} else {
ko.virtualElements.emptyNode(parent);
ko.virtualElements.prepend(parent, newChild);
}
var startValues = {
//marginLeft: '90%',
//marginRight: '-20px',
opacity: 0,
scale: 0.3,
display: 'block'
};
var endValues = {
//marginRight: 0,
//marginLeft: 0,
opacity: 1,
scale: 1
};
$(newChild).page();
$(newChild).trigger('create');
$(newChild).css(startValues);
$(newChild).transition(
{
marginRight: 0,
marginLeft: 0,
opacity: 1,
scale: 1,
duration: duration,
easing: 'in',
complete: endTransition
});
//startValues,500, 'ease');
//$(newChild).transition(endValues, duration, 'swing', endTransition);
//$(newChild).transition({ opacity: 0.1, scale: 0.3 }, 500, 'in', function() {..});
//endTransition();
}
if ($previousView.length) {
$previousView.transition({
opacity: 0,
scale: 0.3,
duration: 500,
easing: 'in',
complete: function(){
$previousView.css('display' ,'none');
startTransition();
}
});
//$('.news').css('display','none');
//$previousView.fadeOut(fadeOutDuration, startTransition);
} else {
startTransition();
}
}
}).promise();
};
return entrance;
});
對不起我的英文不好。
只是谷歌上搜索「慢過渡Android的問題似乎是一個Android的具體問題,而不是一個個都跟迪朗達爾或它的過渡。有些人認爲是這對Android設備的設定具體情況是可以改變的 - 轉到:設置>開發人員選項>過渡動畫縮放>關閉它 –
是的,當然這是Android的針對性,但是這並不意味着它可以」根本不工作。我猜這裏面有一些CSS問題,我根本沒有那麼好用CSS3轉換來弄清楚。 – zewa666
好吧,但你的問題的標題是「迪朗達爾過渡慢於Android」,但應更恰當地名爲「轉變對Android的緩慢」或「JavaScript的過渡在Android慢」 –