【发布时间】:2016-05-06 19:20:49
【问题描述】:
我想要this 之类的东西,找不到任何在钛中使用倾斜的示例。
http://www.w3schools.com/cssref/playit.asp?filename=playcss_transform_skew
【问题讨论】:
标签: mobile appcelerator transformation appcelerator-titanium skew
我想要this 之类的东西,找不到任何在钛中使用倾斜的示例。
http://www.w3schools.com/cssref/playit.asp?filename=playcss_transform_skew
【问题讨论】:
标签: mobile appcelerator transformation appcelerator-titanium skew
由于 3DMatrix 的可用性,目前只能在 iOS 上使用。
试试这个
var ANIMATION = require('animation');
var window = Ti.UI.createWindow({
title : "Tilt Animations",
backgroundColor : 'white'
});
var view = Ti.UI.createView({
backgroundColor : '#0bb',
width : '70%',
height : '50%'
});
var label = Ti.UI.createLabel({
text : 'My Div',
color : 'black',
touchEnabled : false
});
if (OS_IOS) {
view.addEventListener('touchend', touchend);
view.addEventListener('touchcancel', touchend);
view.addEventListener('touchstart', touchStartMove);
view.addEventListener('touchmove', touchStartMove);
}
view.add(label);
window.add(view);
window.open();
function touchStartMove(e) {
ANIMATION.touchStartOrMove(e, view);
}
function touchend(e) {
ANIMATION.touchEnd(view);
}
【讨论】: